« first day (781 days earlier)      last day (3368 days later) » 
11:00 - 21:0021:00 - 00:00

21:00
bwahaha
but you found the bug for me
I didnt implement the contract in Bin
note the class declaration
:( <- noob
ok glad you found a prob
i feel like the BinView layer is just making things more complicated
a BinView is just a template
your PickingViewModel could just as easily generate the bins
and skip the middle layer
then you have a collection of view models, and dont have to navigate through the view to find the vm
:/
I set it up this way on advice
:P
also implementing propretychanged on a list can be wonky
it will only fire when you assign the list
not add or remove from it
thats why I did the Bin object route
because I would update EVERY bin if a single one changed
thsi way it only updates teh Bin that changes
if you have a Bin in a collection of Bins
and update a bin
the collection does not fire a change event
21:04
it didnt work
yeah
but why would you want that behavior
if I bound to Bins[N].BinID for example
that binding didnt work
if I raised the Event in the Bin class as BinID
nothing changed
although... come to think of it
That kind of goes back to the whole "Binding to an index is weird" thing
it may be because I missed implementing the interface
but maybe not so great to use on a first project? it saves you all the INotify boiler plate
21:30
System.Windows.Threading.Dispatcher.Yield();
When is ^useful?
I feel like I want it. Adding a bunch of items to my ItemsControl3D and it takes a while.
Then they all show up at once
In general you shouldn't be doing long-running ops on the UI thread
So you should never need it
but the creation of Visuals is UI thread work
Guess Freezable can mitigate some of it.
No question, but only the final add needs to be done on the UI thread
so you could probably background more than you think
Yeah, I'm always a bit lost with dispatcher stuff
And I wasn't saying your situation didn't call for the Yield
Just saying that you shouldn't normally need it.
21:35
I threw in yield for fun to test it
I've been reading framework sources today. It is pretty hairy.
the api is nice from the outside though
Think I'm gonna have another swing at inheritance context of freezable tonight.
Maybe ask Reed about it.
or perhaps try to find where bindings reslove and step through it a couple of times
That code is no doubt very hairy
Did you see the Helper class I linked?
Is that even legal?
Could you link it again? I think it scrolled off the page
2 hours ago, by Johan Larsson
You can hide some complexity in Helper classes :)
1519 lines in a class with the descriptive name Helper
At least its marked internal
but yeah, I don't think I'd get away with that at work
21:45
maybe it is the result of a cleanup and the name is a joke?
all my projects have a Helper class :(
Maybe, or someone just didn't have any imagination that day
Its just so undescriptive
When I'm trying to think of where I put method X, "Helper" doesn't really come to mind
unless I happen to remember that its there
naming things is hard
Sure, but you can come up with something better than "Helper"
Like "GraphicsHelper"
or "CommsHelper"
or something.
so if you have 1 comm helper function
you make a CommsHelper file to put the 1 function
i guess that is my beef
21:53
Over stuffing 20 unrelated functions into a "Helper" class? Yes, I would do that.
Related:
13
A: Should a helper class's structure be based on input type or output type?

BradleyDotNETNeither A class (ideally) represents a real-world (or programming context world) object that you are trying to model. They will almost always be multi-input/multi-output. For example, "Dog", "Cat", "Car", "Game", and "Player" are all good class names. None of them would be tied to a specific in...

lol i think that is preferrable to 20 one function files
If you are having to do that, I would question the general architecture
agreed
Why do you have 20 completely unrelated static methods?
21:56
Wrote a helper today :)
Not you specifically, just the concept
BindingHelper is a reasonable name
you are the one who brought up the 20 number hehe
22:17
Maybe free functions could be nice
I don't know any c++ but c++ guys seem to like them
C#6 will be one step closer but you have to import the class
could perhaps be swwet with nice tooling support
Perhaps
though like most language features, it seems very prone to abuse
I got another quick question for ya guys, I have that BinView control, and I want to have a click event on it.
I dont care where the user clicks, as long as its within the bounds of the control itself. I tried setting a click event on the Grid that houses the inner components, but it doesnt get fired (presumably because im not clicking on the grid). If I set it on a label and click the label it works. Is there a sneaky way of setting up a click event on something like ....
say an invisible component whose Z Index is the highest on the control so that no matter where they click in the control, a single event handler is fired, or do I need to hook up all of the controls to the same method on click?
PreviewMouseLeftButtonDown or PreviewMouseRightButtonDown
22:32
?
ill be damned
thanks NETscape
its fuggin brilliant
:D
3
Q: Difference between Bubbling and Tunneling events

NeelenduWhat is the exact difference between Bubbling Events and Tunneling events? Where should I use Bubbling Events and where should I use Tunneling events? Thanks in Advance!

22:46
[ContentProperty("Child")]
What does ^ do really?
I was hoping it would tell wpf that it is the stuff to render
protected override int Visual3DChildrenCount
{
    get
    {
        return Child == null ? 0 : 1;
    }
}

protected override Visual3D GetVisual3DChild(int index)
{
    if (Child ==null || index != 0)
    {
        throw new ArgumentOutOfRangeException("index");
    }
    return Child;
}
Both ^ gets called and the Child is a visual that looks right in the debugger
maybe just a small dumb?
23:04
looking at some java open source code... found this:
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + range;
    result = prime * result + slaveId;
    return result;
}
yuck
return new Boolean((((data[offset / 8] & 0xff) >> (offset % 8)) & 0x1) == 1);
23:19
@JohanLarsson Not really sure
hard to remote debug it also :)
I found a hack solution and another bug
23:41
@JohanLarsson It lets the <Child> section be left out, btw
so instead of doing <Foo><Child><local:YourContent /></Child></Foo> you can just write <Foo><local:YourContent /></Foo>
The IAddChild stuff?
the contentpropertyattribute
ok
I have a bunch of questions if you have time.
WIP of the code. @BradleyDotNET clone it and click some? (Small)
23:58
Attempting to build it now...
11:00 - 21:0021:00 - 00:00

« first day (781 days earlier)      last day (3368 days later) »