[gme-users] Plug-in in background
Gabriele Trombetti
gabtromb at isis.vanderbilt.edu
Wed Aug 18 16:06:45 CDT 2004
Hi all,
I need to make a plugin which starts when the user clicks on the icon,
and then remains in background.
I will probably need another thread because some of its operations can
block for a few seconds.
But apart from that, I tried just now with a dummy example which does
not spawn another thread.
In the plugin I put a (never-ending) windows message loop (GetMessage,
TranslateMessage, DispatchMessage) so that the GME interface is still
responsive. BUT as soon as I click on a model in the tree browser on the
right in GME, a messagebox appears telling:
caption = Object inspector
text = Object inspector could not hand over the project data due to an
unexpected error. We apologize for the inconvenience.
(this happens roughly once every time I start the plugin again)
one time also happened this:
caption = Model browser
text = Error completing drop operation (0x87650072): The operation
caused meta violation for object %o
and sometimes also a few other sporadic errors like some "Paradigm
violation" when I actually did nothing significant....
So I suppose this is not the right way. Is there any way to have the
plugin running concurrently with GME? If not I can find a workaround...
luckily in my case I need data from the opened project only at the
beginning, and then I can exit the plugin with the main thread and just
leave a secondary thread running which doesn't need any more access to
the GME project.
Thanks
Gabriele
More information about the gme-users
mailing list