Strange gtkd behaviour

maarten van damme maartenvd1994 at gmail.com
Wed Jul 13 14:00:28 PDT 2011


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


More information about the Digitalmars-d mailing list