Possible issues relating to Carrousel

Dec 9, 2009 at 8:27 AM

I have a strange problem with my code where running ExpressionObserver.Execute(() => Target.Name) gives a different value than just compiling and executing the expression itself.

The problem goes away when I comment out all of the carrousel "cache" code and let it just return the newItem every time.  Basically, all lines but the search key creation and this next line are commented out and it works.

var newItem = creator((Int32)searchKey.First, key);

I'll try isolating the code into a unit test, but if anyone has any ideas where things might be going wrong, I'd be happy to hear them.

Dec 9, 2009 at 7:42 PM

Could the problem be in the Equals and GetHashCode method of the type of your Target? That two distinct instances would be regarded equal though they have different values for Name?

You could disable the carrousel and it would all work but Obtics will become very slow and memory hungry.

Dec 9, 2009 at 9:05 PM

Turns out the problem was a missing property changed event.

Dec 10, 2009 at 6:10 AM

Well; that could be a perfect explanation too :-)