[MonoDevelop] Closing dialog windows from my addin freezes MonoDevelop

Todd Berman tberman at off.net
Fri Sep 30 20:31:25 EDT 2005


On Fri, 2005-09-30 at 14:08 -0400, Scott Ellington wrote: 
> I figured this out.  It was a threading issue.  I needed to call
> Gdk.Threads.Enter() and Leave() as so:
> 
> Gdk.Threads.Enter();
> Runtime.Gui.CommandService.CommandManager.DispatchCommand(FileCommands.NewProject);
> Gdk.Threads.Leave();
> 
> Would it be a good idea for DispatchCommand to call these methods?
> 

No. If you have to use that, something is truly broken.

Whatever code you are calling needs to use the existing in place methods
for changing threads instead of calling enter and leave, as these do
have their own issues (go look at the gdk docs for examples).

At least, that is my understanding. Lluis may be able to give you better
info.

--Todd



More information about the Monodevelop-list mailing list