Strange gtkd behaviour

maarten van damme maartenvd1994 at gmail.com
Wed Jul 13 22:53:05 PDT 2011


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/InputBox.d
http://dl.dropbox.com/u/15024434/MessageBox.d

> On 07/13/2011 11:00 PM, maarten van damme wrote:
>
>> Hello everyone,
>> I wrote two classes that inherit from the Mainwindow class, one is a
>> dialog that asks for your input and one is a plain old messagebox.
>> you can check out the input class here, I think thats the one with the
>> problem: http://dl.dropbox.com/u/**15024434/InputBox.d<http://dl.dropbox.com/u/15024434/InputBox.d>
>> or read the method most likely containing the error:
>> void onclicked(Button button){
>> *answer=input.getText();
>> destroy();
>> Main.quit();
>> }
>>
>> Then I have a main class where I create an inputbox and do Main.run(),
>> then when the user closes the window or presses ok everything after the
>> first main.run gets runned and that displays a messagebox that depends
>> on what the user entered followed by another Main.run();
>>
>> The problem is that when you press ok to close the first input window
>> and then close the next messagebox the program keeps running in memory.
>> Everything after the second Main.run never gets executed. When you
>> however close the first window using the close button and then close the
>> next messagebox the program terminates correctly.
>> I'm assuming I don't completely destroy the inputbox in the onclicked
>> method?
>>
>> If what I gave you is not enough I can give you the links to all the
>> files. Note that these classes are simply me learning gtkd and the d
>> language in general. If you see me doing something "dirty" or bad please
>> tell me so I learn a bit from my mistakes :)
>>
>> Maarten
>>
>
> I'm not sure if the Main.Quit gets executed after you've destroyed the
> InputBox, does it work correctly without the call to destroy?
>
> If not links to the other files would be helpfull.
>
> --
> Mike Wey
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110714/08b18587/attachment.html>


More information about the Digitalmars-d mailing list