Previous Topic Next topic Print topic


COBCH1719 Must specify an EVENT

The target of an attach or detach statement must refer to an event.

The target of an attach or detach statement must be an event; use the event keyword to specify an event. In the following example, the target of the attach statement is the member alarmSwitch, which has not been declared as an event.

class-id myScheduler.
01 alarmSwitch type alarmState static.  *> add the 'event' keyword
method-id main static.
  attach method self::setTime to self::alarmSwitch
end method.
method-id setTime static.
 ...
end method.
end class.

delegate-id alarmState.
 ...
end delegate.
Previous Topic Next topic Print topic