Re: Event firing from changing EOs
Re: Event firing from changing EOs
- Subject: Re: Event firing from changing EOs
- From: Florijan Stamenkovic <email@hidden>
- Date: Mon, 7 Jan 2008 11:55:57 -0400
Guido,
Thanks for the reply. I do not need this for logging. Where I need it
in are Java Client applications. I am just finishing up a library
that will make it quite easy to build WO + Swing applications. The
library is totally event driven, all the GUI controllers and all that
stuff has been made to respond to events fired by EOs that have
changed. So, the end purpose is keeping the GUI in synch with the
current state of EOs.
So, if the changes in the end get saved to the database or not is not
relevant in my scenario.
That being said, what do you think? Till now my solution was to use
EOGenerator to define setters that take care of event firing, when
needed. This works, but I always wanted to do this more elegantly,
and overriding the mentioned methods seems just about right. I am
just wondering if EOF can at any time for any reason bypass them.
Reading the API makes me think it can not, but I wanted to check...
Flor
On Jan 06, 2008, at 19:03, Guido Neitzer wrote:
On 06.01.2008, at 15:53, Florijan Stamenkovic wrote:
I am trying to make an EOGenericRecord subclass that will
automatically fire events when new values are set. It is
imperative that the event firing is absolute, nothing can be
allowed to slip by, if a property changes in any way, an event has
to be fired.
Hmm. Do you want to log the change in the EO or the change in the
database? Because if you log changes to the EO, you might end up
with logged stuff that was never saved and therfor does not exist
outside the scope of where the change happened (and was reverted).
What I did for logging changes to EOs was checkin in
"willUpdate" (using Wonder) by getting the changes from the
snapshot. I also have some code to check whether relationships
change but that is not really thought out completely.
cug
--
http://www.event-s.net
_______________________________________________
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