On Oct 10, 2006, at 3:09 PM, Florijan Stamenkovic wrote:

Hi Chuck,

If nothing like that exists, I am thinking of implementing it through a notification posting EOGenericRecord subclass. Any comments or tips about this?

There is a discussion and implementation of what you want in Practical WebObjects starting on page 67. You really need the help of the EC.

If I understand it correctly, your editing context subclass posts notifications once objects are saved to the persistent data store.

Not quite. It can notify before a change, after a change but before a commit (save changes), and after a commit.


I need notifications being fired on every edit of any EO in my app, not in the persistent store, but in the editing context. I need that to fire Swing events,

I imagine that this makes quite some difference, both as this is happening client side and for Swing's general architecture.


but didn't point that out in my original post. And, I need them to fire *after* object(s) have been edited.

How about overriding all takeValue...() methods? Would that be inadvisable?

Yes, that probably makes the most sense for what you are trying to do.


One more question: EOs are not automatically removed from to-many relationships after being deleted, even when their delete rule is set to nullify. Is this another client side EOClassDescription bug, or a standard behavior?

That is standard behavior. Delete rules are processed as part of the preparation work done in saveChanges(). You can call ec.processRecentChanges() to force this to happen earllier.

Good to know. Does that make sense? Shouldn't the object store reflect the latest changes to EOs managed in that store? Maybe I am missing something though...

I don't think that I can argue that this makes sense. :-) I have always wondered why this needed to be like this. My best guess is that it was done as a performance optimization.

Chuck

--
Coming in late 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to