On Mar 17, 10:24 am, Duchesnes Grégory - Ilomedia
<[email protected]> wrote:
> tried the show method as well but it didn't work.
>
> I think i'm missing something obvious but i don't see what.
> My code is below, am i stupid?

Firebug is complex, sophisticated, and not well documented.

>
> FBL.ns(function() { with (FBL) {
>
> function firejettsPanel() {}
>
> firejettsPanel.prototype = extend(Firebug.Panel,
> {
>     name: "firejetts",
>     title: "FireJetts",
>         parentPanel: 'html',
>
> });
>
> Firebug.firejettsModel = extend(Firebug.Module,
> {
>
>     initialize: function() {
>         Firebug.Panel.initialize.apply(this, arguments);
>     },
>

showPanel means "Hey model, we are about to show panel". It should be
reserved for model updates base on panel selection, that that should
be very rare. We are often using in it incorrectly now in firebug
now.  We should not be using it to set up the panel UI. You should
move most of this code to panel.show() I think.

>     showPanel: function(browser, panel) {
>         var isfirejettsPanel = panel && panel.name == "firejetts";
>         var firejettsButtons = browser.chrome.$("fbfirejettsButtons");
>         collapse(firejettsButtons, !isfirejettsPanel);
>
>         if (!isfirejettsPanel) return;
>
>         var doc = panel.document;
>         var div = panel.panelNode;
>
>         if (!this.initialized) {
>             this.initialized = true;
>         }
>
>                 var htmlpanel = FirebugContext.getPanel('html');
>                 if(typeof htmlpanel.selection != 'undefined' && 
> htmlpanel.selection != null)
>                 {
>                         xpath = this.getElementXPath(htmlpanel.selection);
>                         this.xpathRep.myTag.append({xpath:xpath}, div, 
> this.xpathRep);
>                 }
>     },
>
>         showSidePanel: function(browser, panel)
>     {

Generally you should call showPanel, its a framework method.

>         this.showPanel(browser, panel);
>     },
>
>         show: function(state)
>     {
>                 // nothing pops up in console :(

Nothing comes out because this is a panel method, not a module method.

>         Firebug.Console.log('show');

I suggest using
         if (FBTrace.DBG_JETT) and learning about FBTrace or learning
chromebug our debugger.

Looks like you are close...

jjb

-- 
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