Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   GUI onClose? (https://forums.graalonline.com/forums/showthread.php?t=64007)

xXziroXx 02-09-2006 06:09 PM

GUI onClose?
 
Is there a way to detect when a GUI gets closed?

Kronan 02-09-2006 07:04 PM

You probably can make your own function to check, other than that i'm not sure. :(

Ajira 02-09-2006 10:43 PM

I'm pretty sure there's a var like CloseQuery = "true"; and I think that calls a function.

Rick 02-09-2006 11:00 PM

Quote:

Originally Posted by Ajira
I'm pretty sure there's a var like onCloseQuery = "true"; and I think that calls a function.

I think you're thinking about destroyOnClose. Could be wrong though.

Ajira 02-10-2006 12:30 AM

Quote:

Originally Posted by Rick
I think you're thinking about destroyOnClose. Could be wrong though.

I believe you're wrong. :D

Edit: Sorry, it's closequery = "true"; but I'm not sure what the function is that is called from this.

Lance 02-10-2006 08:34 AM

In the future, please post GS2-specific questions in the GS2 forum.

I'm moving this one for you.

ApothiX 02-10-2006 03:16 PM

Quote:

Originally Posted by Ajira
I believe you're wrong. :D

Edit: Sorry, it's closequery = "true"; but I'm not sure what the function is that is called from this.

I'm pretty sure it just sends onClose() or onQueryClose() I can check when I get home if still no one is certain.

xXziroXx 02-10-2006 09:45 PM

onClose() doesnt work, I have yet to try onQueryClose().

EDIT: Cant get any of them to work..

xXziroXx 02-16-2006 05:36 PM

*bumps*

I kinda still need help with this..

Ajira 02-17-2006 03:39 AM

Quote:

Originally Posted by xXziroXx
onClose() doesnt work, I have yet to try onQueryClose().

EDIT: Cant get any of them to work..

Try onCloseQuery()?

xXziroXx 02-17-2006 07:15 PM

I did, didnt work.

ApothiX 02-18-2006 09:34 AM

Quote:

Originally Posted by xXziroXx
I did, didnt work.

set the window property:
closequery = true;

then use:
function WindowName.onCloseQuery() {
}


Note: If I recall correctly, if you use this method you have to manually call .destroy() in the onCloseQuery() handler.

xXziroXx 02-18-2006 04:09 PM

Im pretty sure I tried that, but now it works so I must´ve missed something the alst time I tried it.. Thanks Okiesmokie!

Skyld 02-18-2006 04:41 PM

I thought it was something like this?
PHP Code:

function onClose(obj)
{
  
// obj is the GUI window in question
  
obj.destroy();



Admins 02-23-2006 02:32 AM

You can also use onShow(), onHide(), onWake(), onSleep().
Need to add all events and description to the wiki.graal.net I think

ApothiX 02-23-2006 03:35 PM

Quote:

Originally Posted by Skyld
I thought it was something like this?
PHP Code:

function onClose(obj)
{
  
// obj is the GUI window in question
  
obj.destroy();



I thought so too, but he said it didn't work for him x_x
Also, I don't think you have to call obj.destroy() in onClose.

Quote:

Originally Posted by Stefan
Need to add all events and description to the wiki.graal.net I think

I agree ;)

Admins 02-25-2006 09:57 PM

Ok added like all events to the description of the GuiControls at http://wiki.graal.net/index.php/Crea.../Script/Client .

I have also added some variables (rows[], icon etc.) which are not listed by "-listscriptfunctions" and were not mentioned in the wiki before.


All times are GMT +2. The time now is 11:09 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.