Yes, exactly. I'm concerned that overriding
HTMLPanel.getContextMenuItem() would be fine for my own purposes but
that it wouldn't "play well" with others.

Thanks for the info, though.

- Ben



On Dec 11, 8:29 am, John J Barton <[email protected]> wrote:
> Ben sorry for the delay, we are trying wrap up 1.5. I want to talk to
> Honza about some new/better ways to extend firebug but we need to get
> some bugs fixed first.
>
> For now you can just create a Firebug module and in its initializeUI()
> you can monkey patch HTMLPanel.getContextMenuItem(). Any better
> solution would be rather similar, we just want to sort out how two
> extensions can work without interfering with each other.
>
> jjb
>
> On Dec 10, 9:43 am, Ben Keen <[email protected]> wrote:
>
> > Bump! :-)
>
> > On Dec 4, 7:29 pm, Ben Keen <[email protected]> wrote:
>
> > > Hi John,
>
> > > Here's what I'm trying to do. I've been working with JsonML a lot
> > > recently (seehttp://jsonml.org/) and would like a quick and simple
> > > way to convert a node and all child nodes into a properly formatted
> > > jsonML object. When right-clicking on a node within the Firebug HTML
> > > panel it already provides a number of similar options ("Copy HTML",
> > > "Copy innerHTML", "Copy xPath"), so it seems only logical to add my
> > > new "Copy jsonML" option to that location. There are, of course, other
> > > ways to do it, but in terms of usability it seems like that's the best
> > > spot for it.
>
> > > Thanks again for your help.
>
> > > - Ben
>
> > > On Dec 4, 5:04 pm, John J Barton <[email protected]> wrote:
>
> > > > On Dec 4, 3:05 pm, Ben Keen <[email protected]> wrote:
>
> > > > > Hi John,
>
> > > > > Thanks for the tip! I looked over the code and I think I can get the
> > > > > general sense of what it's doing and how the menu items are being
> > > > > added, but can't reproduce the functionality within my own extension.
> > > > > Presumably, the onContextShowing() method is called every time a user
> > > > > right clicks on a node, so that it shows the appropriate options for
> > > > > the selected node (correct?), so my hunch is that even though my
> > > > > extension is adding the new menu item when it first loads, it's just
> > > > > overwritten when the user right-clicks on the node. At least, this is
> > > > > my best guess...
>
> > > > > So do I need to wrap that existing function within my own function? Or
> > > > > override the entire function itself? If so, how?
>
> > > > It depends on how your extension relates to the rest of Firebug. We
> > > > don't have a lot of experience with extensions that don't add panels.
> > > > So if you say some more about what you have in mind I'll make
> > > > something up...
>
> > > > jjb
>
> > > > > Sorry for the 20 questions. It's rather tricky getting a foothold on
> > > > > this stuff!
>
> > > > > - Ben
>
> > > > > On Dec 4, 9:10 am, John J Barton <[email protected]> wrote:
>
> > > > > > On Dec 3, 7:00 pm, BenKeen <[email protected]> wrote:
>
> > > > > > > Hey folks,
>
> > > > > > > A question for somebody. I'm trying to write a simple Firebug 
> > > > > > > plugin
> > > > > > > that adds a new item to the menu that shows up when you 
> > > > > > > right-click on
> > > > > > > the HTML panel on a node. I've been poring over some tutorials 
> > > > > > > and the
> > > > > > > code on Google Code but haven't found out much.
>
> > > > > > > I found this rather encouraging section - the getContextMenuItems
>
> > > > > > Yes, have a look at chrome.js onContextShowing. There are several 
> > > > > > ways
> > > > > > to add items.
>
> > > > > > jjb
>
> > > > > > > function - but wasn't sure how to implement it within my own
> > > > > > > extension.http://www.google.com/codesearch/p?hl=en#FXMmmf0ln7k/content/firebug/...
>
> > > > > > > Any tips...?
>
> > > > > > > Thanks!
>
> > > > > > > - Ben

--

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