Skip to main content



      Home
Home » Eclipse Projects » GEF » Updating figures from other threads
Updating figures from other threads [message #53709] Sat, 11 January 2003 15:10 Go to next message
Eclipse UserFriend
Hi,

Is it possible to cause figures to be updated different threads? I have a
thread that does a complex calculation, and when it finishes I want to be
able to change the figure to indicate the result (by changing the way it is
created). When I try to repaint (or revalidate) the figure, I get a null
pointer at DeferredUpdateManager.queueWork, where currentDisplay returns
null. Is there a standard way to do something like this?

Thanks,
Bradley.
Re: Updating figures from other threads [message #58675 is a reply to message #53709] Tue, 28 January 2003 10:22 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It is not safe to update the figures from background threads.

What if the figure is in the middle of painting its children, and you remove
one of its children. Bad!

Use display.[a]syncExec(Runnable);

"Bradley Schmerl" <schmerl@cs.cmu.edu> wrote in message
news:avpsr0$q1h$1@rogue.oti.com...
> Hi,
>
> Is it possible to cause figures to be updated different threads? I have a
> thread that does a complex calculation, and when it finishes I want to be
> able to change the figure to indicate the result (by changing the way it
is
> created). When I try to repaint (or revalidate) the figure, I get a null
> pointer at DeferredUpdateManager.queueWork, where currentDisplay returns
> null. Is there a standard way to do something like this?
>
> Thanks,
> Bradley.
>
>
Previous Topic:Create a new Figure where the Drop occurs
Next Topic:Zooming Rectangles
Goto Forum:
  


Current Time: Mon May 12 19:03:35 EDT 2025

Powered by FUDForum. Page generated in 0.03317 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top