Re: valueForKey(...) from within takeStoredValueForKey(...) = infinite loop
Re: valueForKey(...) from within takeStoredValueForKey(...) = infinite loop
- Subject: Re: valueForKey(...) from within takeStoredValueForKey(...) = infinite loop
- From: Florijan Stamenkovic <email@hidden>
- Date: Wed, 16 Jan 2008 16:08:31 -0400
Hi Fabian,
Thanks for the reply. This is (more or less) what I am doing now. I
have a method provided in the common superclass that fires the event,
the only difference from your approach is that I do it after the
change has occurred. What I wanted to do was get rid of the
EOGenerator / custom setter dependancy... End goal being event firing
without the need for per-entity subclasses that keep doing the same
thing anyway.
From your post I assume this didn't work for you?
Flor
On Jan 16, 2008, at 15:31, Fabian Peters wrote:
I've been down that road as well. storedValueForKey is used behind
the scenes by EOF. I ended up putting a method in a common superclass:
public void willChange(Object oldValue, Object newValue, String
key) {
// to be used by subclasses
}
And then placing this in the setters created by EOGenerator:
willChange(storedValueForKey("theKey"), value, "theKey");
When I need this fine-grained change tracking on an EO, I fill in
the willChange() method.
HTH,
Fabian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden