GUI Problem?
Author |
Message |
threatbinder
|
Posted: Tue Dec 29, 2009 1:01 am Post subject: GUI Problem? |
|
|
Example of my problem:
Okay, so the problem with this is, it works the first time, but the second time the window will open and close so fast that it won't even show. This is because after doing GUI.Quit once, it will always return true in the
so it will go to Window.Close (winID) without even waiting for the click on the GUI button... is there any solution to this problem? (if I didn't clearly explain my problem, it would help if you try copy and pasting this code onto turing --> press a every time, and see how the first time it opens a window, and after that it doesn't (it does but we can't see it open because it closes so fast).
Any solutions please?
I'm using 4.1.1 btw. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Euphoracle
![](http://compsci.ca/v3/uploads/user_avatars/11170373664bf5f25f636f1.png)
|
Posted: Tue Dec 29, 2009 2:12 am Post subject: RE:GUI Problem? |
|
|
GUI.ResetQuit or something. Check the docs. |
|
|
|
|
![](images/spacer.gif) |
TheGuardian001
|
Posted: Tue Dec 29, 2009 2:14 am Post subject: Re: GUI Problem? |
|
|
You could try not calling GUI.Quit, and having a different exit when with the GUI.Quit
GUI.Quit should only ever be called if you are completely done with GUI. If you've called GUI.Quit, it doesn't bother to continue to check for events, since there's no GUI to check for events from.
If you only want to get rid of specific widgets, you can either hide them with GUI.Hide(widget), which is temporary, or GUI.Dispose(widget) which is permanent.
Edit: ninja'd by Euphoracle's better solution. |
|
|
|
|
![](images/spacer.gif) |
Euphoracle
![](http://compsci.ca/v3/uploads/user_avatars/11170373664bf5f25f636f1.png)
|
Posted: Tue Dec 29, 2009 2:47 am Post subject: RE:GUI Problem? |
|
|
Actually, GUI.Dispose would be better in the context with which he is using this. Didn't think of that. |
|
|
|
|
![](images/spacer.gif) |
threatbinder
|
Posted: Tue Dec 29, 2009 4:04 pm Post subject: Re: RE:GUI Problem? |
|
|
Euphoracle @ Tue Dec 29, 2009 2:47 am wrote: Actually, GUI.Dispose would be better in the context with which he is using this. Didn't think of that.
thanks for the gui.resetquit, didn't see that in the turing docs when i looked over the gui unit. |
|
|
|
|
![](images/spacer.gif) |
|
|