great, sounds very easy..uhm..
i think i know what you mean, and creating an 'event-router' sound
pretty straightforward,
but also, i need this manager to work asynchronously, while there's
network traffic involved, so i also need an event queu sort of
solution, so that the next event can only happen when there was a
positive respons to the previous request.
so that pushing a button, would put that event in a queu, and first all
previous events get executed before the button event takes effect.
i think i have some ideas for a solution, one is the following;
everything is controled using parent-scripts, so everythign is an
object.
i thought, if one object generates an event (and wants to send request
to the server) it first has to 'subscribe to the queue', which means,
it places a reference of itsself at the end of a list. and only the
first item in that list gets update-events. On the first update-event
it can send it's request, than wait for a respons which can be many
update-events later, and then, when it handled the respons, it deletes
itsself from that list.. so the next object can start to work.
it's a bit abstract when i describe it here, but i hope you understand.
i was just thinking that someone must have done this kind of thing
before, and there's probably a much easier way to do it.. a kind of
multi-threading in lingo...
thanks
arri
On 30 mei 2005, at 18:11, Chuck Neal wrote:
Sure. I actually went to this route for more complex projects. It
gets crazy trying to manage events, director events, send sprites,
etc. By using a custom event manager you can set it up so that when
an action happens it just tells the global event object what action it
did and any parameters. I have mine set to receive...
The event name (symbol)
The event data (typically a property list of info)
A qualifier - To restrict which events run.
So you can register things with the manager like buttonClick. When a
button is clicked it just triggers the event and passes its name as a
qualifier. The manager checks the objects for anything with that
event that matches the qualifier and triggers the callback. This is
also useful if you want multiple objects to respond to an event at
once.
Carrying this over to 3d is also a much easier way to catch and
trigger item interactions.
-Chuck
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]