Closed Bug 556754 Opened 16 years ago Closed 15 years ago

Add-on Builder generates add-on whose context-menu cannot work

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED
5.12.9

People

(Reporter: bugzilla, Assigned: jorgev)

References

()

Details

Attachments

(1 file)

Current Add-on Builder https://addons.mozilla.org/en-US/developers/tools/builder will generate ff-overlay.xul which includes: var extname = { onLoad: function() { // initialization code this.initialized = true; this.strings = document.getElementById("extname-strings"); }, onMenuItemCommand: function(e) { var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); promptService.alert(window, this.strings.getString("helloMessageTitle"), this.strings.getString("helloMessage")); }, ... } window.addEventListener("load", extname.onLoad, false); Context menu cannot work since extname.strings is not defined on window load event but only global strings variable is defined. # be careful about "this" when you pass method as callback or event handlers. Please fix last line to: window.addEventListener("load", function() { extname.onLoad(); }, false);
Cesar, Jorge, thoughts?
Just by looking at the code in Comment #0, the bug is clearly there, and the fix looks right.
I had the same problem today by using the generated output from the Add-ons Builder and it has been taken more than an hour to figure out this problem. Thankfully Dave helped me here. Can we get this fixed please?
Jorge, would you be willing to write a patch for fizzypop to fix this? We still have a good amount of add-ons built using the packager. http://svn.mozilla.org/projects/fizzypop/trunk/
Assignee: nobody → jorge
Target Milestone: --- → Q4 2010
Here's a patch (trivial, but untested). Who reviews this stuff?
mfinkle and cesar are responsible for fizzypop I think.
Fixed, r76511.
Status: NEW → RESOLVED
Closed: 15 years ago
Priority: -- → P3
Resolution: --- → FIXED
Target Milestone: Q4 2010 → 5.12.2
It appears that this fix (and probably the fix for bug 556752) were never pushed to the server. According to bug 625053, this is still happening. What's the procedure to get this pushed?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 5.12.2 → 5.12.7
fizzypop is an svn:external, but it's not locked to a revision. site/vendors/fizzypop http://svn.mozilla.org/libs/fizzypop.mozdev I'd expect this to get updated automatically when we svn up remora, but I don't really remember how svn works anymore.
Ah, I just noticed that jorgev has been editing projects/fizzypop/ while remora has been pointing at libs/fizzypop.mozdev. Fun stuff!
Like Jeff said, AMO is using http://svn.mozilla.org/libs/fizzypop.mozdev . Can you put any changes into that library?
Also, fwiw, I do update it with every remora release, it's just pulling from a spot that wasn't getting new code I guess.
It's fligtar's fault! I'll move the commits to the new lib in .7. Thanks.
Target Milestone: 5.12.7 → 5.12.9
Committing again on r82040.
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Verified fixed.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: