Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [udig-devel] how to start threads with monitor?

Hm, seems like you are accesing UI thread, from another....

Try Display.asyncExec(runnable), and let runnable do the neccesary work. I
think this should work.


-----Original Message-----
From: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Andrea
Antonello
Sent: Monday, April 23, 2007 2:25 PM
To: User-friendly Desktop Internet GIS
Subject: [udig-devel] how to start threads with monitor?

I know this is more a rcp question than  a udig, but I'm not able to add
progress tracking to my actions.
The tool extention point doesn't supply a monitor and whenever I try
somethin g like:
        IWorkbench wb = PlatformUI.getWorkbench();
        IProgressService ps = wb.getProgressService();

            ps.busyCursorWhile(new IRunnableWithProgress(){
                public void run( IProgressMonitor pm ) {

                    doMyCodeWithMonitorActivity()
                }
            });
I get an Invalid thread access exception.

Any hint?
Thanks in advance,
Andrea
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top