attach またはdetach 文のターゲットは、イベントである必要があります。event キーワードを使用してイベントを指定します。次の例では、attach 文のターゲットはメンバalarmSwitchであり、イベントとして宣言されていません。
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.