how to get an eventname 2004-03-16 - By Christophe Herreman
Back Hello people,
is there a way to get the name of an event that is being executed?
I'm building this treeview, in which I want to broadcast events when the user presses, release, ... the icon of a node.
this works: icon.onPress = function(){ this._parent.ref.broadcastMessage("onIconPress", node); }
but I want to do it dynamicly, like: var arr_events = ["onPress", "onRelease"];
for(var i=0; i<arr_events.length; i++){ icon[arr_events[i]] = function(){ this._parent.ref.broadcastMessage("onIcon" + EVENT, node); } }
I can't get the EVENT out of it any suggestions?
thx in advance, Christophe
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107072 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|