Thanks a lot for clarifying it for me. It runs perfectly now. I should've used gtk.(message)dialog but I got terribly lost in the gtk documentation and so I missed it.
2011/7/14 Mike Wey <[email protected]> > On 07/14/2011 07:53 AM, maarten van damme wrote: > >> when I leave destroy out the inputbox always stays visible even after >> I've pressed ok. >> here are the other files >> http://dl.dropbox.com/u/**15024434/Main.d<http://dl.dropbox.com/u/15024434/Main.d> >> >> http://dl.dropbox.com/u/**15024434/InputBox.d<http://dl.dropbox.com/u/15024434/InputBox.d> >> http://dl.dropbox.com/u/**15024434/MessageBox.d<http://dl.dropbox.com/u/15024434/MessageBox.d> >> > > I see you are calling Main.run twice, although you would only call it once > it will work. But you'll also need to call Main.Quit twice, probably when > the second 'Messagebox' is closed. > > This is because Main.run() runs the gtk eventloop and returns when > Main.Quit is called. > > Yoe might also want to look at gtk.Dialog and gtk.MessageDialog for your > "InputBox" and "MessageBox" respectively. > gtk.Dialog has it's own run method which returns a response code when the > user closes the dialog, by clicking ok/cancel/etc... or just closes it. > > -- > Mike Wey >
