Thanks On Wed, Jun 15, 2011 at 11:19 PM, Jan Honza Odvarko <[email protected]>wrote:
> The code works for me well (and the options menu is checked if I > set the pref through about:config) > > [SK] Thats weird. I did see this working only once for some strange reason. I could click and unclick the options and immediately see the changes in about:config/ However it does not work otherwise. No code changes. do you know if this is some firefox bug? > The only thing I noticed in your code snippet is that 'panelName' is > not defined. > [SK] Yes. I did modify some part of the code snippet to be more generic. I could have omitted the panelName var. > > Honza > > > On Jun 15, 10:52 pm, Shashank Khanvilkar <[email protected]> wrote: > > Hello, > > > > I am trying out the FB options menu, using a panel code like: > > I tried two different ways. > > > > --SNIP-- > > function TempPanel() {} > > TempPanel.prototype = extend(Firebug.Panel, > > { > > name: panelName, > > title: "Temp", > > > > initialize: function() { > > Firebug.Panel.initialize.apply(this, arguments); > > }, > > > > // getOptionsMenuItems: function(context) > > // { > > // return [ > > // this.optionMenu("OPTION1", "TEMP.option1"), > > // "-", > > // this.optionMenu("OPTION2", "TEMP.option2") > > // ]; > > // }, > > > > getOptionsMenuItems: function(context) > > { > > return [ > > optionMenu("TEST1", "TEMP_TEST1"), > > "-", > > ]; > > }, > > > > optionMenu: function(label, option) > > { > > var value = Firebug.getPref(Firebug.prefDomain, option); > > return { > > label: label, > > nol10n: true, > > type: "checkbox", > > checked: value, > > command: bindFixed(Firebug.setPref, this, Firebug.prefDomain, > > option, !value) > > }; > > } > > > > }); > > > > --SNIP-- > > > > The pref.js looks like: > > pref("extensions.firebug.TEMP.option1", false); > > pref("extensions.firebug.TEMP.option2", true); > > pref("extensions.firebug.TEMP_TEST1", true); > > > > When i start FF, even though the option TEMP_TEST1 has been set in prefs > to > > true, the check box does not appear. > > I look at about:config and the pref is set to True. > > Even though I clicked on that option, clicked somewhere else and again > > opened the options menu, the checkbox remains clear. > > > > All help appreciated. > > Thanks > > Shank > > -- > 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. > > -- 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.
