From: Doug M. <do...@cr...> - 2003-09-29 19:30:02
|
Assuming you are using DynAPI 3x var arrObjects =3D dynapi.document.getChildren(); for (var i =3D 0 to arrObjects.length()){ arrObjects[i].invokeEvent("myEvent"); } ----- Original Message -----=20 From: Brian Hayes=20 To: dyn...@li...=20 Sent: Friday, September 26, 2003 8:19 PM Subject: [Dynapi-Help] How do you trigger an event that all objects = can see? Hello, I have come a long way with my project, and I know this would = not be a reality without dynapi....( I am a spokes person) however, the = learning curve is somewhat on the uphill side.. With that said, it there = a way to make an invokeEvent('someevent'), global? or, send the event to = all objects loaded on the page? I ask because I read some where that = widgets should not have eventhandlers embedded in them, but the only way = I have been able to get my objects to see the event is through the = e.getSource().parent.envokEvent('somevent').. However, this only work on = child deep.. And when I attempt to change everything over to the other = recommended way var o=3Dtjhis; and reference o.someFunction(); it seams = to break NS6 and 7.. Example: WidgetA this.addEventListener({onpathrun: function(e){ = if(e.getSource().parent){ = e.getSource().parent.invokeEvent('onpathrun',null)}}); This is inside every singe widget that is a child of another widget, = until I get to the main widget that needs the event. Any advice would be appreciated. Thanks, Brian Hayes --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/03 |