Home Cooker Classes Others Rice
Classes  >  switch  >  IsEnabled
switch class : IsEnabled getter

Description

Gets a value that indicates whether the eventhandler is running.

Syntax

switchInstance.IsEnabled

Arguments

None

Return value

ClassDescription
boolA value that indicates whether the eventhandler is running.

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(lceva ea)

8:

// any handling code....

9:

endmethod

10:

...

11:

endclass

Usage of the IsEnabled getter is as follows.

1:

handle h = new handle();

2:

switch ehs = b.LoadCompleted(h,"handler(lceva)");

3:

ehs.Start(); // Starts handling.

4:

...

5:

if(ehs.IsEnabled)

6:

ehs.Stop();

7:

endif

Notes

If the eventhandler is already running, this getter returns true. Otherwise, returns false.

Links for reference

None.

Copyright © Rice All rights reserved.