Re: Detecting eo changes when they happen
Re: Detecting eo changes when they happen
- Subject: Re: Detecting eo changes when they happen
- From: Florijan Stamenkovic <email@hidden>
- Date: Wed, 11 Oct 2006 00:09:07 +0200
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:
This email sent to email@hidden