What do you mean by
run the triggering code from within a behavior itself
The following code doesn't work. I guess because if the active flag isn't set the first time, then the behavior never wakes up. One problem is I don't think you can call initialize() or processStimulus() from any outside objects. If you could, then this should work right?
1 2 3 4 5 6 7 8 9 10 11
| public void initialize(){ if(active){ this.wakeupOn(timeEvt); } }
public void processStimulus(Enumeration criteria){ if(active){ this.wakeupOn(timeEvt); } } |
Was the above code fragment what you were talking about or something else?