Chuck,

The stuff I have already made relies on all of this information, so the notification simply will not do. And, IIRC, the mentioned notification only gets posted when you ask the EC to save changes. This is NOT what I need. I need immediate feedback.

They get sent at the end of the event. In a web app, that is at the end of the RR loop. For a client app, that would be after processing an event in the event loop. You might need to manually call ec.processRecentChanges() in your event loop code.

Hm. Well, this is a kind of a batch approach to editing. I can see what you're saying, but it is very WOish. Which seems to work brilliantly when making Web apps. It is not (in my eyes) so glamorous in JavaClients. I mean, it is too oriented towards the RR loop. Multiple edits, multiple values being processed in one big go. Where, the way I see it, JC offers exactly the opposite: smaller actions, direct feedback. A million small events as opposed to a few big ones.

No words of wisdom on these methods, Chuck?

public void takeStoredValueForKey(Object value, String key)
protected void includeObjectIntoPropertyWithKey(Object eo, String key) protected void excludeObjectFromPropertyWithKey(Object eo, String key)

API and some testing suggests that using them to fire events should do.

I have not used them for what you are describing so I am a little cautious to say "Yes, that will do it". I am not sure what happens, for example, if the object gets invalidated, or saved in another EC so that this EC updates.

Right, that's interesting. I'd have to see about that. Till now I have used setters that are generated to fire events when they are called. The cool thing about that is that none of this used to be an issue. Maybe I should just stick to that approach. Never got me in trouble.

I think it doing what you are describing will work. I am not sure that these three methods will handle 100% of the cases. I'd take a look at these methods too:

public void turnIntoFault(EOFaultHandler faultHandler)
public void updateFromSnapshot(NSDictionary aSnapshot)

Will do.

Except for the fact that they get called also when the objects are being initialized after construction. I'd have to work around that.

You should be able to set a flag in awakeFromFetch (or maybe some other method) before calling super and suppress the notifications while the flag is set.

Will try that out.

Thanks!
Flor
_______________________________________________
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