when I leave destroy out the inputbox always stays visible even after I've pressed ok.<div>here are the other files</div><div><a href="http://dl.dropbox.com/u/15024434/Main.d">http://dl.dropbox.com/u/15024434/Main.d</a></div>
<div><a href="http://dl.dropbox.com/u/15024434/InputBox.d">http://dl.dropbox.com/u/15024434/InputBox.d</a></div><div><a href="http://dl.dropbox.com/u/15024434/MessageBox.d">http://dl.dropbox.com/u/15024434/MessageBox.d</a><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On 07/13/2011 11:00 PM, maarten van damme wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everyone,<br>
I wrote two classes that inherit from the Mainwindow class, one is a<br>
dialog that asks for your input and one is a plain old messagebox.<br>
you can check out the input class here, I think thats the one with the<br>
problem: <a href="http://dl.dropbox.com/u/15024434/InputBox.d" target="_blank">http://dl.dropbox.com/u/<u></u>15024434/InputBox.d</a><br>
or read the method most likely containing the error:<br>
void onclicked(Button button){<br>
*answer=input.getText();<br>
destroy();<br>
Main.quit();<br>
}<br>
<br>
Then I have a main class where I create an inputbox and do Main.run(),<br>
then when the user closes the window or presses ok everything after the<br>
first main.run gets runned and that displays a messagebox that depends<br>
on what the user entered followed by another Main.run();<br>
<br>
The problem is that when you press ok to close the first input window<br>
and then close the next messagebox the program keeps running in memory.<br>
Everything after the second Main.run never gets executed. When you<br>
however close the first window using the close button and then close the<br>
next messagebox the program terminates correctly.<br>
I'm assuming I don't completely destroy the inputbox in the onclicked<br>
method?<br>
<br>
If what I gave you is not enough I can give you the links to all the<br>
files. Note that these classes are simply me learning gtkd and the d<br>
language in general. If you see me doing something "dirty" or bad please<br>
tell me so I learn a bit from my mistakes :)<br>
<br>
Maarten<br>
</blockquote>
<br></div></div>
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?<br>
<br>
If not links to the other files would be helpfull.<br>
<br>
-- <br><font color="#888888">
Mike Wey<br>
</font></blockquote></div><br></div>