switch class : Stop() method

Description

Stops the event handling.

Syntax

instance.Stop()

Arguments

None

Return value

None

Sample code

Suppose you have the following class definition.

1:

class handle

2:

open method void LCHandler(dictionary dic)

3:

... // event handler code.

4:

endmethod

5:

endclass

Usage of the Stop() method is as follows.

1:

browser b = new browser();

2:

handle h = new handle();

3:

switch sw = b.LoadCompleted(h,"LCHandler(dictionary)");

4:

sw.Start();

5:

sw.Stop(); // It stop the event handling.

Notes

If the event handling is already stopped, re-call will be ignored.

The implementation of event handling has been changed in Cooker ver 3.0.3. Please note the following points.


This method stops event handling, but does not deassign the handler and event. You should call the Detach() method if you want to completely remove the handler from the event handling system.

Links for reference

None

Copyright © Cooker All rights reserved.