So if e represents the event/element triggering the event and you create 
multiple event listeners, how are they all kept straight?

  For example:
alert(this.name);[result=foo]
var l = new EventListener(this);
l.oncreate = function(e)
{
  var o = e.getTarget();
  alert(o.name);[result=foo]
  ....more code...

  Both alerts in the above snippet give 'foo' as a response.
  An event listener was created, linking it to 'this'.
  Then you used the oncreate function of the EventListener to execute the 
function. But 'e' is passed into the function.
  If this is an 'element' to which an eventListener is linked, which event 
listener is passing it's associated element in? Because 'foo' returns both 
times it seems like e.getTarget() must be returning this (which is indeed 
named 'foo'). l is the only EventListener associated with 'this' at this 
time in the code!

  Hmm. Any ideas/clarifications? I keep getting turned around when thinking 
about the fact that e is always handy and there's never confusion when 
creating multiple EventListeners about what e is.
  Maybe e is a member variable/object of the current DynLayer and by passing 
e into the EventListener functions you're ensuring that if something happens 
to an event handler (could be any one of multiple event handlers) the 'root' 
DynLayer that you want to affect is indeed changed?

  Well, thanks for the help/input. It seems silly to get bogged down in this 
, but I like to know what the arguments being passed back and  forth are, 
and with DynAPI there are a lot of implicit objects associated with being a 
DynLayer that I see used, but not explained.

  Cheers,
  James

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
PC Mods, Computing goodies, cases & more
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to