My Firebug extension is both activable and a Net panel listener. The
question I have is how to programmatically enable the Net panel when
my panel is enabled such that I can receive listener events? At first
I tried registering an observer with the NetMonitor in my panel's
onActivationChange() method like so:

onActivationChanged: function(enable)
{
        if (FBTrace.DBG_COLDFIRE || FBTrace.DBG_ACTIVATION)
            FBTrace.sysout("coldfire;
ColdFirePanel.onActivationChanged; enable: " + enable);
        
        if(enable) {
                Firebug.NetMonitor.addObserver(this);
                Firebug.ColdFireModule.addObserver(this);               
        } else {
                Firebug.NetMonitor.removeObserver(this);
                Firebug.ColdFireModule.removeObserver(this);
        }
},


With this approach I didn't receive any listener events. Next I tried
enabling the entire Net panel using the following:

onActivationChanged: function(enable)
{
        if (FBTrace.DBG_COLDFIRE || FBTrace.DBG_ACTIVATION)
            FBTrace.sysout("coldfire;
ColdFirePanel.onActivationChanged; enable: " + enable);
        
        if(enable) {
                Options.set("net.enableSites", true);
                Firebug.ColdFireModule.addObserver(this);               
        } else {
                Firebug.ColdFireModule.removeObserver(this);
        }
},

That seems to work in that I now receive the listener events, however
the Net panel's tab UI is not update to indicate it is enabled. It
still appears greyed out even though when you open the panel it is
indeed enabled. Is this just a bug, or should I be enabling the panel
using a different approach?

Thanks,

--Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to firebug@googlegroups.com
To unsubscribe from this group, send email to
firebug+unsubscr...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug

Reply via email to