[Solved] ToggleButton doesn´t exist :(

Hey there,

since last night my toggleButton just broke. I already used older code versions to see if I broke something, but without any change: code that did work, now doesn’t. Here is the code that fails followed by the console´s output:

    log('Creating button...');
    var { ToggleButton } = require("sdk/ui/button/toggle");
    log(ToggleButton);
    button = ToggleButton({
        id: 'auto-plugin-checker',
        label: getLabel(),
        icon: getIcon(),
        onChange: function(state) {
        if (state.checked) {
            panel.show({
                position: button
            });
        }
    }

});
log (button);

Cosole:
“apc: Creating button…” main.js:68
"apc: " function () main.js:70
"[CustomizableUI]" “NotFoundError: Node was not found – :1074” CustomizableUI.jsm:167
"apc: " Object { checked: false, label: “auto-plugin-checker: All plugins up…”, icon: “resource://auto-plugin-checker-at-j…”, disabled: false, id: “auto-plugin-checker” }

I can´t find anything about it in the web :frowning :frowning:

Does anybody know anything helpful?
Thanks,
Paul

Which version of Firefox did you test it with? Did you update Firefox right before it broke?

Hey Jorge,

thanks for the idea. No I didn´t update before, but updating solved it :slight_smile:
I was using the nightly build btw.

Thanks,
Paul

Ah, yes, Nightly can be unpredictable. Always good to have release or beta around to confirm any issues.