Developing environment: HP/Palm WebOS, Eclipse with SDK 1.4.5.465, Win7
I have a class in which I want to declare and under certain circumstances, fire an event. Then, in the corresponding stage assistant listen for that event, and when it's raised, do something.
reading the reference i've come across Mojo.Event.make, Mojo.Controller.stageController.sendEventToCommanders, Mojo.Event.send and a few more that i think are related to what i'm trying to achieve, but I fail to find an example especific to this (declaring, firing and listening).
To clarify, the event I want to fire is not related to a widget nor an html tag with an id.
Mojo.Event relies on the originator of the event being a node/element in an HTML document. From what I can tell there is no built in library for events outside of the DOM context so at this point you'll have to implement your own. Depending on how complex your situation is you may be able to get a way with just creating a property on the object you're listening to and storing a function that get's called a certain time in the future:
The biggest limitation to this model is that you can only have one object listening to the particular event but in some situations that's all you need.