Note that in the 3.0 API, the documentation for Dialog.show says

"Note that the WindowClose event sent to the dialog when it is closed is
informational only, and exists for purposes such as re-enabling a
document-showing button. It cannot be consumed to prevent the dialog from 
closing."


This was changed in 4.0, as Friedger noted.

In 3.0, when you click the close box on the View, the View is destroyed and then
a WindowClose event is fired at the Dialog for notification.  I think the change
in 4.0 is that the WindowClose is fired at the Dialog first, and only if it is
not consumed will the View be destroyed.


-- Duke

Takanobu Maekawa wrote:
> Hi.
> 
> I cannot handle and consume WindowClose event with Dialog,
> using the bellow code.
> 
> When a dialog shows, I expect that I cannot close the dialog window
> when I push the close button.
> 
> Please tell me where is wrong.
> 
> ------------------------------------------------------------------------
> {curl 3.0 applet}
> {curl-file-attributes character-encoding = "shift-jis"}
> 
> {import * from CURL.GUI.BASE}
> {import * from CURL.GUI.CONTROL-BASE}
> 
> {do
>     let dlg:Dialog = {Dialog}
>     {dlg.add
>         {Frame
>             {VBox "this is test dialog"}
>         }
>     }
> 
>     {dlg.add-event-handler
>         {on e:WindowClose do
>             {e.consume}
>         }
>     }
> 
>     {dlg.show owner=null,modal?=false}
> }
> ------------------------------------------------------------------------
> 
> --Maekawa


*******************************************
To unsubscribe from this list, send a mail to:
mailto:[EMAIL PROTECTED]
To contact a human list administrator, send a mail to:
mailto:[EMAIL PROTECTED]
To recieve a list of other options for this list, send a mail to:
mailto:[EMAIL PROTECTED]

Reply via email to