alert don't occur in Extending Firebug, toolbar (Part II.)

127 views
Skip to first unread message

fancyerii

unread,
Nov 22, 2011, 2:22:38 AM11/22/11
to Firebug
I download the source code of this blog(http://
www.softwareishard.com/blog/firebug-tutorial/extending-firebug-toolbar-part-ii/).
It do create a panel named "hello world" and a button in it. But when
I click it, nothing happens. What's wrong with it? how could I debug
firebug extension?
My firefox version is 7.0.1. because the install.rdf's version is
small, so I change this:
<em:maxVersion>10.0.*</em:maxVersion>

Jan Honza Odvarko

unread,
Nov 25, 2011, 3:16:55 AM11/25/11
to fir...@googlegroups.com
The example uses FirebugContext global variable that has been replaced by Firebug.currentContext (to avoid global space pollution).

See the helloWorld.xul and change the following code:

    <commandset id="mainCommandSet">
        <command id="cmd_hwMyButton" oncommand="Firebug.HelloWorldModel.onMyButton(FirebugContext)"/>
        <command id="cmd_hwDisableNetMonitoring"
            oncommand="Firebug.HelloWorldModel.onDisableNetMonitoring(FirebugContext)"/>
    </commandset>

to:

    <commandset id="mainCommandSet">
        <command id="cmd_hwMyButton" oncommand="Firebug.HelloWorldModel.onMyButton(Firebug.currentContext)"/>
        <command id="cmd_hwDisableNetMonitoring"
            oncommand="Firebug.HelloWorldModel.onDisableNetMonitoring(Firebug.currentContext)"/>
    </commandset>

Honza

Sebo

unread,
Nov 25, 2011, 6:19:24 AM11/25/11
to fir...@googlegroups.com
This shows, that it's really time to update the examples. Many users rely on your posts, if they want to start coding Firebug extensions.
Though I know the time factor plays the biggest role again.

Sebastian

Jan Honza Odvarko

unread,
Nov 25, 2011, 6:58:50 AM11/25/11
to fir...@googlegroups.com
I have already updated the page with a description and link to this thread.

Honza

Sebo

unread,
Nov 25, 2011, 8:43:20 AM11/25/11
to fir...@googlegroups.com
Great! Though at some point we'll need new tutorials replacing the old ones. I know I am just demanding and didn't contribute to that tuturials yet. Let's see, if there's a little bit more time for that in the future.

Sebastian
Reply all
Reply to author
Forward
0 new messages