Home Notices Documents Classes Download Others Rice
Classes  >  window  >  Closed(class,string)
window class : Closed(class,string) method

Description

Assigns an event handler to the "Closed" event.

Syntax

windowInstance.Closed(class handleInstance, string signature)

Arguments

ClassNameDescription
classhandleInstanceAn instance with the event handler as a member.
stringsignatureSignature of the event handler.

Return value

ClassDescription
ehswitchA switch that controls the execution of the event handler.

Sample code

Suppose you have the following class definition.

1:

class handle

2:

...

3:

open fitter handle()

4:

// any initialization code...

5:

endfitter

6:

...

7:

open method void handler(eventargs ea)

8:

// any handling code....

9:

endmethod

10:

...

11:

endclass

Handler assignment is as follows.

1:

window w = new window();

2:

handle h = new handle();

3:

ehswitch ehs = w.Closed(h,"handler(eventargs)");

4:

ehs.Start(); // Starts handling.

Notes

It's a wrapper of the System.Windows.Window.Closed event.


The handler for this event must be an open method with one argument of the eventargs class.

In other words, if the method name of the handler is "handlerName", the definition of the handler is as follows.


open method void handlerName(eventargs ea)

...

endmethod


In this case, the signature of the handler specify by the second argument is "handlerName(eventargs)".

Links for reference

Copyright © Rice All rights reserved.