Both Jes and Jamesr idea work. Thanks a lot.

Based on reference manual, OL team seems using onvisible for this
purpose. This is non standard compare to other language. For people who
RTFM then okie, if not will have a big learning curve.

Cheers,
James

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jes Lefcourt
Sent: Tuesday, May 29, 2007 5:19 AM
To: [email protected]
Subject: Re: [Laszlo-user] Which event triggered while closing a WINDOW

Another option is to override the close method, and create an onclose  
event:

<method name="close">
        if(this['onclose'])
        {
                this.onclose.sendEvent();
        }

        super.close();
</method>


On May 28, 2007, at 2:51 PM, Benjamin Shine wrote:

> I think this is your best bet -- I just looked through the code and  
> there isn't an onclose event. Surprising.
>
> On May 28, 2007, at 4:20 AM, jamesr wrote:
>
>> As one solution, you can slave to the visible attribute of the  
>> window in question:
>>
>> <window id="win1" closeable="true">
>>      <text>hi there</text>
>> </window>
>>
>> <handler name="onvisible" reference="win1">
>>      ...
>> </handler>
>>
>> that about do it? let me know..
>>
>> -j
>>
>>
>> On May 28, 2007, at 5:43 AM, Ong Leong Seng wrote:
>>
>>> Dear all,
>>>
>>>
>>>
>>> As describe in title, any one have idea what event will triggered  
>>> when closing a WINDOW by using the cross button on the right top  
>>> corner.
>>>
>>>
>>>
>>> Cheers,
>>>
>>> James
>>>
>>> ------------------------------------------------------------------
>>> -
>>> -
>>> -
>>> DISCLAIMER:
>>>
>>> This e-mail (including any attachments) may contain confidential
>>> information. If you are not the intended recipient, you are hereby
>>> notified that any dealing, review, distribution, printing, copying
>>> or use of this e-mail is strictly prohibited. If you have received
>>> this email in error, please notify the sender or MIMOS Berhad
>>> immediately and delete the original message. Opinions, conclusions
>>> and other information in this e-mail that do not relate to the
>>> official business of MIMOS Berhad and/or its subsidiaries shall be
>>> understood as neither given nor endorsed by MIMOS Berhad and/or its
>>> subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts
>>> responsibility for the same. All liability arising from or in
>>> connection with computer viruses and/or corrupted e-mails is
>>> excluded to the fullest extent permitted by law.
>>>
>>>
>>>
>>
>
> Benjamin Shine
> Software Engineer, Open Laszlo / Laszlo Systems
> [EMAIL PROTECTED]
>
>
>


------------------------------------------------------------------
-
-
-
DISCLAIMER: 

This e-mail (including any attachments) may contain confidential 
information. If you are not the intended recipient, you are hereby 
notified that any dealing, review, distribution, printing, copying 
or use of this e-mail is strictly prohibited. If you have received 
this email in error, please notify the sender or MIMOS Berhad 
immediately and delete the original message. Opinions, conclusions 
and other information in this e-mail that do not relate to the 
official business of MIMOS Berhad and/or its subsidiaries shall be 
understood as neither given nor endorsed by MIMOS Berhad and/or its 
subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts 
responsibility for the same. All liability arising from or in 
connection with computer viruses and/or corrupted e-mails is 
excluded to the fullest extent permitted by law.


Reply via email to