On Sep 17, 2008, at 9:56 AM, Florijan Stamenkovic wrote: When you created the instance you are now trying to update, did you insert it into an editing context?
What's your point Dave? I don't see how this would influence the runtime binding of methods.
I've seen weird things happen if you try to do things to an object without first inserting it into an EditingContext. Things that seem totally unrelated to EOF. While I doubt it is actually the problem it was the first thing that popped into my mind when you are getting unexpected results from something as simple as this.
The other related thing I would ask is: Where are you calling this method from? You aren't calling it from a constructor, are you?
This is the type of method I would expect that you would want to call when creating an Invoice for the first time to setup default values. For example, set it's status to "Open" or something.
If you are calling this method as part of first creating an invoice, make sure you are doing it from awakeFromInsertion instead of the constructor.
Unrelated, but also something to consider: What behavior do you expect when the InvoiceStatus is set to null? (EOF does this when you delete an invoice) Should it update the InvoiceStatusDate value then? If not then you're if-statement should also check to be sure that the passed value is not null.
if(value != null && value != invoiceStatus()) {
Dave |