Strange gtkd behaviour

maarten van damme maartenvd1994 at gmail.com
Thu Jul 14 14:39:34 PDT 2011


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 <mike-wey at example.com>

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110714/778750ec/attachment.html>


More information about the Digitalmars-d mailing list