Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting eo changes when they happen



Hi Robert,


Flor,

I'm not sure if this is a good idea or not, I've never tried this myself, but have you looked into registering with EOObserverCenter for EOObserving.objectWillChange(Object)?

Maybe it would be possible, in the Swing client scenario where I need it. The following code should do it:


public void someEOWillChange(){
new Thread(){
public void run(){
SwingUtilities.invokeLater(new Runnable(){
public void run(){
...work being done AFTER the event dispatch thread is done, and all EO changes are made...
}
});
}
}.start();
}


However, to guarantee that the updating work is being done after EOs were changed, the only thread to ever modify EOs would have to be the event dispatch thread. I prefer to avoid that restriction, but I will give it some thought, thanks for pointing the idea. It should be simple, if it works.

Sounds a bit scary to me as far as possibly introducing performance, and other various, issues, but just might do the trick for you.

Well, it is a client process, and a single user can make changes only so fast. I hope it shouldn't be too bad. Optimizations could be made not to fire more Swing events then necessary. Still, it's a trip into the bowls of EOF, and I am not sure I am up to it :)


Cheers,
Flor

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >Detecting eo changes when they happen (From: Florijan Stamenkovic <email@hidden>)
 >Re: Detecting eo changes when they happen (From: Robert Walker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.