The "click" handler is used to expand and collapse the trace tree
itself. So I'm left with either using double click or some form of
alternative such as "right-click" or "Alt" + "click" etc.  Out of
these, double click seemed the most intuitive and since it results in
switching panels I felt it could be the right UI idiom.

That said, I've no problems modifying this behavior, so if there is an
alternate method that is more acceptable I'll gladly implement it.

Regards,
Manoj

On Jan 6, 2:28 pm, John J Barton <[email protected]> wrote:
> The 'Firebug Way' to close over the context is 'bind' eg
>
> this.onDblClick = bind(this.onDblClick, this);
>
> That causes the event handler to have "this" as the panel if you run
> it in initiailzeNode(), so 'this.context' is available.
>
> (Also, Firebug isn't a double click UI, so onDblClick will not seem
> natural.)
>
> jjb
>
> On Jan 6, 11:32 am, Manoj <[email protected]> wrote:
>
> > Thanks.
>
> > BTW. I'm using a closure to access context inside the callback.
> > Is there a better/preferred way to accomplish this?
>
> > initializeNode: function(oldPanelNode)
> > {
> >     // do this so that context is available inside onDblClick handler
> >     this.onDblClick = (function(context) {
> >       return function(e) {
> >         // Parse event "e" and create the appropriate object.
> >         ...
> >         context.chrome.select(obj);
> >       };
> >     })(this.context);
>
> >     this.panelNode.addEventListener("dblclick", this.onDblClick,
> > false);
> >     Firebug.Panel.initializeNode.apply(this, arguments);
>
> > }
>
> > On Jan 6, 3:32 am, Jan Odvarko <[email protected]> wrote:
>
> > > The NetFileLink object for Net panel selection is ready (R1637).
>
> > > The use-cases are as follows:
>
> > > // Selection by URL
> > > context.chrome.select(new FBL.NetFileLink("http://...";));
>
> > > // Selection by request object (in case there can be more requests
> > > with the
> > > // same URI in the Net panel).
> > > context.chrome.select(new FBL.NetFileLink(null, request));
>
> > > // Selection by file object (the object that is used to represent a
> > > request
> > > // in the Net panel).
> > > context.chrome.select(file.getFileLink());
>
> > > Honza
>
> > > On Jan 6, 12:53 am, John J Barton <[email protected]> wrote:
>
> > > > If you have an object that Firebug supports, then you can use:
> > > >   context.chrome.select(object);
> > > > In fact unless you know otherwise, this is a good place to start. At
> > > > worst you will end up in the DOM tab with something you created but
> > > > Firebug does not know about.
>
> > > > For Script panel, create a SourceLink. These are the things you see in
> > > > the Console when you have an error. Other things the script panel
> > > > supports:
> > > >  object instanceof jsdIStackFrame
> > > >             || object instanceof SourceFile
> > > >             || (object instanceof SourceLink && object.type == "js")
> > > >             || typeof(object) == "function" )
>
> > > > For Net panel I don't see any supportsObject. Looks like we need
> > > > something like a NetFileLink(win, href), supported by Net panel. When
> > > > the select() for that object comes to the net panel, it can lookup the
> > > > NetDocument and NetFile objects and select them.  Hopefully Honza will
> > > > read this and weigh in...
>
> > > > John.
>
> > > > On Jan 5, 2:33 pm, Manoj <[email protected]> wrote:
>
> > > > > One of the UI features of the Firebug extension I'm developing would
> > > > > be to allow the user to readily switch to Firebug's Net or Script
> > > > > panel when they double click on the appropriate network or JS function
> > > > > trace item.
>
> > > > > Is there an API that can be used for accomplishing this?
>
> > > > > For e.g. From my extension, given the request URI, how can the
> > > > > appropriate request details be highlighted in the Net panel. (assuming
> > > > > the Network monitoring is enabled)
>
> > > > > Similarly, given a filename and line number, how can the appropriate
> > > > > file be displayed in the Script panel.
>
> > > > > Regards,
> > > > > Manoj
--~--~---------~--~----~------------~-------~--~----~
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