Home Notices Documents Classes Download Others Rice
Classes  >  ehswitch  >  Signature(string)
ehswitch class : Signature(string) setter

Description

Sets the signature for calling the handler method.

Syntax

ehswitchInstance.Signature = signatureStr

Arguments

ClassNameDescription
stringsignatureStrA signature of the handler method.

Return value

None

Sample code

Suppose you have the following class definition.

1:

class handleA

2:

...

3:

open fitter handleA()

4:

// any initialization code...

5:

endfitter

6:

...

7:

open method void handlerA(eventargs ea)

8:

// any handling code....

9:

endmethod

10:

...

11:

endclass

12:

// --------------------------------------------------------

13:

class handleB

14:

...

15:

open fitter handleB()

16:

// any initialization code...

17:

endfitter

18:

...

19:

open method void handlerB(eventargs ea)

20:

// any handling code....

21:

endmethod

22:

...

23:

endclass

Usage of the Signature setter is as follows.

1:

browser b = new browser();

2:

handleA ha = new handleA();

3:

handleB hb = new handleB();

4:

ehswitch ehs = b.Load(ha,"handlerA(eventargs)"); // The ha handles the event.

5:

ehs.Start(); // Starts event handling.

6:

...

7:

ehs.Handler = hb; // Changes the handle instance to the hb.

8:

ehs.Signature = "handlerB(eventargs)"; // Also changes the handler method.

Notes

This setter has been added in CookerGX Ver 1.0.0.2.

Links for reference

None

Copyright © Rice All rights reserved.