switch class : OneShot() method
Starts the event handling.
Suppose you have the following class definition.
open method void LCHandler(dictionary dic)
... // event handler code.
Usage of the OneShot() method is as follows.
browser b = new browser();
handle h = new handle();
switch sw = b.LoadCompleted(h,"LCHandler(dictionary)");
sw.OneShot(); // The handler method will be called just once.
When the event occurs, calls the handler method only once.
Event handling stops after the call.
If this method is already called, re-call will be ignored.
Links for reference