I'm pretty sure, you are right with your suggestion.
But i have failed to tell the event, where to find my "foo". That's
the reason why i came up with Firebug.Cocoon3ProfilingModule.alertStuff
(currentIndex);");

alert(foo); or alert(Firebug.Cocoon3ProfilingModule.alertStuff);
doesn't result in any output at ally.
alert(window.location) writes "chrome://firebug/content/panel.html".

But the good news:
the eventHandler-thingie works great!

I'm curious why onselect does not know where to look, while
addEventListener does.

Last thing to look at is passing arguments to the EventListener, which
shouldn't be that much of a problem, should it?

Thank you very much again!

Kind regards,
Andreas

On Jun 19, 7:58 pm, johnjbarton <[email protected]> wrote:
> Just a generic guess: foo is not in the scope of the onselect event
> hander. alert means "window.alert" which always exists. "foo" means
> "look up 'foo' here". I suggest you try
> alert(foo)
> and when that comes up "undefined"
> try
> alert(window.location)
> and compare the value to the point where foo is defined.
>
> (Maybe you can use tree.addEventListener('select', foo, true)
> instead?)
>
> jjb
>
> On Jun 19, 10:50 am, APinter <[email protected]> wrote:
>
> > Hello there,
>
> > I've already asked for your help once, and got perfect help. So I hope
> > you can help me again.
>
> > I'm still working on the same project and want to react on a
> > "onselect" event of my XUL-tree.
> > This works fine, as long as I'm not trying to do any productive.
>
> > The following works great:
> > tree.setAttribute("onselect", "alert(currentIndex);");
>
> > This one:
> > tree.setAttribute("onselect", "foo(currentIndex);");
> > and this one:
> > tree.setAttribute("onselect",
> > "Firebug.Cocoon3ProfilingModule.alertStuff(currentIndex);");
> > do not work.
>
> > "foo" is a custom method, which does nothing special at the moment. It
> > just don't get called.
> > Same for "alertStuff"
>
> > You can find my Plugin in the "net" tab. When you open a request you
> > should get another tab called "Cocoon 3 Profiling".
>
> > I attached my XPI to provide you with as much information as
> > possible.
> > I hope you are able to help me again.
>
> > Kind regards,
> > Andreas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to