Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT and GEF : INVALID_THREAD_ACCESS


Yes, it is a fundamental design decision in SWT that the thread that created the widget is the only thread that can access it.  To access a widget from another thread, see Display.syncExec() and Display.asyncExec().



sducas@xxxxxxxxxxxxxxx
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

10/06/2004 10:58 AM

Please respond to
platform-swt-dev

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] SWT and GEF : INVALID_THREAD_ACCESS





I've a problem concerning the threads in eclipse Platform:

Using GEF, I want an TreeEditPart to be refreshed (with refreshVisuals()...) when a file is deleted. (As if I wanna do an GEF-based resource navigator...).
But it seems that the IResourceChangeListener.resourceChanged(...) are trigged from a seperate thread that the Main one so I have an INVALID_THREAD_ACCESS error when trying to setWidgetText to my swt widget (in the refreshVisuals body) ...

If the resource has changed but has not been deleted it works well, but not if the resource has been deleted....

So what can I do???

Is it really important for SWT to check that the thread accessing to the widget is the same that has created this widget???

THANK YOU VERY MUCH...

-------------------------------------------------------------
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 € TTC/min)
Minitel: 3615 NETCOURRIER (0,16 € TTC/min)

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top