Closed Bug 913128 Opened 11 years ago Closed 11 years ago

xulPanel problem with prefs.js

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: shweta.universidad, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0 (Beta/Release)
Build ID: 20120423122624

Steps to reproduce:

I used the code that's in the mozilla tutorial written in the following link:
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/modules/sdk/panel.html#error

The code is:

var panel = require("sdk/panel").Panel({
  width: 180,
  height: 180,
  contentURL: "https://en.wikipedia.org/w/index.php?title=Jetpack&useformat=mobile"
});
 
panel.show();


Actual results:

At first, this was the error message:
(addon-sdk-1.14)shweta@ubuntu:~/Desktop/my-primero$ cfx run
Using binary at '/usr/bin/firefox'.
Using profile at '/tmp/tmp8Dq5WU.mozrunner'.
error: my-primero: An exception occurred.
SyntaxError: missing ; after for-loop initializer
resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/l10n/prefs.js 21
Traceback (most recent call last):
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/l10n/prefs.js", line 21, in null
    for (let node of nodes) {
error: my-primero: An exception occurred.
TypeError: this.__xulPanel is null
resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/panel.js 271
Traceback (most recent call last):
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/content/symbiont.js", line 172, in _onReady
    self._onInit();
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/panel.js", line 351, in _onInit
    this._emit('inited');
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 123, in _emit
    return this._emitOnObject.apply(this, args);
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 153, in _emitOnObject
    listener.apply(targetObj, params);
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/panel.js", line 328, in _onShow
    this._frameLoadersSwapped = true;
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/panel.js", line 63, in 
    .swapFrameLoaders(this._viewFrame);
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/panel.js", line 271, in 
    get _viewFrame() this.__xulPanel.children[0],
Total time: 9.419487 seconds
Program terminated successfully.


The code doesn't work and now it shows me the following message:
(addon-sdk-1.14)shweta@ubuntu:~/Desktop/my-primero$ cfx run
Using binary at '/usr/bin/firefox'.
Using profile at '/tmp/tmpbKDSNw.mozrunner'.
error: my-primero: An exception occurred.
SyntaxError: missing ; after for-loop initializer
resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/l10n/prefs.js 21
Traceback (most recent call last):
  File "resource://jid1-8sbnizmnp8negq-at-jetpack/addon-sdk/lib/sdk/l10n/prefs.js", line 21, in null
    for (let node of nodes) {
Total time: 14.870420 seconds
Program terminated successfully.



Expected results:

It should have displayed the panel like the tutorial says and show no error message!
Are you actually using Firefox 12 like your bug report shows? We don't support running in older versions of Firefox.
Flags: needinfo?(shweta.universidad)
Please reopen if you can reproduce this on a current version of Firefox.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
This was fixed!
Flags: needinfo?(shweta.universidad)
You need to log in before you can comment on or make changes to this bug.