« first day (1222 days earlier)      last day (2927 days later) » 

12:09 AM
things are broken
 
12:33 AM
@Julien pull
added sorting to the demo, looks like it works
set bp in the eventhandlers
 
works in your demo but not in mine
 
ok, I need to sleep now
publishing a package any way
 
sleep tight friend
 
really annoying that findname did not work
i could see the scrollviewr in the debugger with that exact name
maybe i dumbed something or maybe wpf felt it was quirk-time
 
 
13 hours later…
1:21 PM
waves
 
@LynnCrumbling ノシ
 
1:40 PM
so rainy this morning...
 
Boiling today
 
 
2 hours later…
3:36 PM
seems like this would be okay
switch(thing)
{
    case thing.one:
        var vm = 1;
        break;
    case thing.two:
        var vm = 2;
        break;
}
 
Shouldn't vm be declared outside of the switch?
Otherwise you're going to go out of scope and lose the value.
 
3:53 PM
@NETscape a code like this would freak me out in C#
 
@NETscape does not compile
switch(thing)
{
    case thing.one:
    {
        var vm = 1;
        break;
    }
    case thing.two:
    {
        var vm = 2;
        break;
    }
}
did not try to compile it
 
@JohanLarsson compiles... so braces make a difference... hrmmm. though i tested that
 
braces creates a scope
I sometimes throw in empty scopes for that:
 
well i can understand that, but scope is kinda defined by the break
 
{
    var foo = 1;
    ...
}
no if just braces
 
4:04 PM
yep, thats scope too
but
case thing.one:
    var one = 1;
    var two = 2;
    var sum = one + two;
    break;
that's basically implied scope
 
4:25 PM
Is this a real world scenario when you'll have something like this, what type would "thing" be ?

switch(thing)
{
case thing.one:
...
}
 
@NovitchiS idk, maybe some db has some categorical/enumerated data it's trying to store, and stored it as a collection of boolean values?
and thing is a POCO that has all those bools in it
so one and two are bools (maybe three, four, five, too), and exactly one of them is true?
and i guess in that case you'd maybe have different views/viewmodels that you'd want for each of the "types" that are stored this way, so something like @NETscape 's example would be what you want.
 
well in this demo it would be an enum.
thing would be a field in a class
just a demo... i just figured since it implies scope with break (or so I thought), that you could use same variable name in separate scopes.
 
4:47 PM
OK, now i get it, the "thing" is the name of the enum and the name of a field in a class, the same name confused me having no VS coloring differently :)
I once saw something like this in code, and was really surprised that it can be valid.
  var c = new MyClass();
  switch (c)
   {
        case 1:
             break;
        case 2:
             break;
     }
I let you guy figure out how's that possible. Have a good evening, i'm out.
 
5:44 PM
@NovitchiS interesting.
 
6:11 PM
	public class MyClass
	{
		public static implicit operator int(MyClass c)
		{
			return 1;
		}
	}
(puke)
 
yeah, puke++
 
6:36 PM
wait... does that.... no... it can't..... does that do what I think it does?
 
7:11 PM
don't look at it
 
7:24 PM
hi all. is there a free wireframing/mockup tool for WPF? i don't have Visio.
 
hello there. I need some help with localization. I have a button that changes the culture of an application, but because all the elements are already loaded, it doesn't actually change anything. I know it works because placing the culture change statement before InitializeComponent() is called, it does change things based on the resx file I have. How do I reload the controls to match the culture change?
Should I post this as a full blown question? Other answers I've found lead to dead links or don't work when I try them.
 
i guess same goes for me as @mmf1102 asked. should i post this as a full blown question?
 
7:41 PM
@Alex maybe there is something in blend, I have never used it
 
8:11 PM
@Alex Blend does that
well, sort of - they have a "sketch" mockup tool
less wireframe, more hand drawn looking
 
@mmf1102 If you are using databinding, you shouldn't need to reload controls at all.
 
@mmf1102 In general, changing culture is something where I'd actually suggest restarting the app entirely...
 
8:28 PM
Reed is back!
 
all hail our lord and saviour
 
If Gjallarhorn signals the start of Ragnarök what I've been writing this week is post apocalypse level.
Absolutely retarded amounts of mutation :)
 
8:41 PM
@ReedCopsey How do I restart the app? I've been trying to figure out how to do that
 
9:06 PM
get the entry assembly, Process.Start it, shut down
 
@ReedCopsey when is it appropriate to use Task.Delay(millisecondsTimeout).Wait();?
should it replace Thread.Sleep
 
9:21 PM
@NETscape ... Never?
Thread.Sleep would be more effecient (though that's really almost always a bad idea and a sign of a design problem)
await Task.Delay(...); makes sense in places
but with .Wait(), not really
 
@ReedCopsey that's what i was thinking... just wanted to double check lol
 
 
2 hours later…
11:16 PM
Shot in the dark - I've added some .png files to Resources and used them on buttons in xaml. Works fine. Merge changes down to another branch, everything looks good in project, designer looks correct, builds - but at runtime the button images are missing in this branch. Any ideas where to start looking?
I'll post an actual question if needs be, just figured I'd ask here first.
- TFS added the files.
- Right-click Included in project
- Verified Build Action is still Resource
- Designer correctly shows images, just not runtime.
 
@OhBeWise check the copy settings and verify that they are in the bin folder
maybe they are compiled into the dll, don't remember
 
11:35 PM
Ok, it looks like it's the path - which I don't know how to resolve in this type of situation.

So the path of the working version is:
C:\Projects\GPSTFS\CIM\Trunk\CIM\Plugins\GOLDPointSystems\EGTInstitutionConfig\EGTInstitutionConfig\Resources

Broken version:
C:\Projects\GPSTFS\CIM\RelBr\Ver8.0\CIM\Plugins\GOLDPointSystems\EGTInstitutionConfig\EGTInstitutionConfig\Resources

In Xaml:
"pack://application:,,,/EGTInstitutionConfig;component/Resources/Refresh.png" fails, but full path works - but I don't want to have to manually change this in each branch if possible.
 
I usllually just have Path="/Images/Image.png"
don't remember if I have leading slash
 
so you don't use the component portion?
 
I don't always go full pack
 
trying to update prop used for canexecute from background thread to enable/disable bound button, CommandManager.InvalidateRequerySuggested(); isn't working. how to fix?
 
But there are edge cases where fulll pack is needed, at least for the designer so probably not a bad habit to use it for all things
 
11:40 PM
clicking UI triggers requery, but nothing else as far as INPC and what not
 
er
@NETscape use another implementation for manual commands, sample. Reed has stuff that is very similar, think it is starred.
 
hmm. only caveat there is that when Trunk gets reversioned, the "previous trunk" will similarly break the image due to the path changing (not my design)
 
@Netscape Marshal the invalidaterequerysuggested to main thread
but, in general, I'd recommedn avoiding using commandmanager altogether
 
or grab a nuget
 
it's very problematic - and as apps get larger, it becomes really nasty
@Johan Doesn't WPF already use a weak event manager to subscribe to CanExecuteChanged? I don't think doing it internally is adding any benefit...
 
11:44 PM
not sure
but not sure what is actually done
 
That's my point - you don't need to do that in the command
the framework subscribes to your event using the internal one
so it's already "weak" when tied to WPF
the only reason you'd need to do what you do is if you were subscribing to it yourself
but pretty sure WPF uses its weak event manager to manage it's own subscriptions - so it won't keep you alive
 
@JohanLarsson well... made a change to one button to use your path suggestion, ran it and all buttons work. undid changes and all images still work. mystery fix. Thanks for the suggestions though, I will keep them in mind in future cases
 
@ReedCopsey really close if you are pretty sure but I don't think I'm removing it
 
Easy enough to test ;)
 
Also when it comes to weak stuff I can only cargo cult things
are you busy?
 

« first day (1222 days earlier)      last day (2927 days later) »