Home News DOC Class DL Others Rice
Class  >  window  >  Activated(class,string)
window class : Activated(class,string) method

Description

Assigns a handler to the "Activated" event.

Syntax

instance.Activated(class handleClass, string signature)

Arguments

ClassNameDescription
classhandleClassAn instance with the handler as the member.
stringsignatureSignature of the handler.

Return value

ClassDescription
switchAn instance to control handler execution.

Sample code

Suppose you have the following class definition.

1:

class handle

2:

open method void AHandler(dictionary dic)

3:

switch sw = dic.Switch;

4:

endmethod

5:

endclass

Handler assignment is as follows.

1:

window w = new window();

2:

handle h = new handle();

3:

switch sw = w.Activated(h,"AHandler(dictionary)");

Notes

The "Activated" event is fired when the window is activated.


The handler for the "Activated" event must be an open method with one argument of the dictionary 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(dictionary dic)

...

endmethod


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

The dictionary passed to the handler has the following key/value pairs.

keyvalue - classvalue - description
SenderwindowThe origin of the event.
SwitchswitchThe switch returned by the handler assignment.

The handler runs in its own thread.

Links for reference

None.

Copyright © Rice All rights reserved.