Closed
Bug 814877
Opened 12 years ago
Closed 12 years ago
Getting exception "Component returned failure code: 0x80004005" while calling "Save Dialog box" from addon(on addon-sdk-1.11 command prompt).
Categories
(Add-on SDK Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: pawansngh88, Assigned: mossop)
Details
Attachments
(1 file)
160.45 KB,
application/octet-stream
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0 Build ID: 20121011153627 Steps to reproduce: Created an addon. Ran it using: (addon-sdk-1.11)linux@localhost saveData$ cfx run It opened firefox window, then addon creates a panel widget in status bar, which when clicked shows URL of current activetab, which I pressed "Enter". Actual results: An Exception occurred and showed up on addon-sdk-command prompt in Fedora 16 64-bit: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFilePicker.init]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource:///modules/XPIProvider.jsm -> jar:file:///tmp/tmp_shjYh.mozrunner/extensions/jid1-EIGYxW9SgU93jg@jetpack.xpi!/bootstrap.js -> resource://jid1-eigyxw9sgu93jg-at-jetpack/api-utils/lib/loader.js -> resource://jid1-eigyxw9sgu93jg-at-jetpack/savedata/lib/main.js :: save :: line 54" data: no]. Expected results: It should have opened a "save" dialog box.
Updated•12 years ago
|
Component: Untriaged → General
Product: Firefox → Add-on SDK
Version: 16 Branch → unspecified
Assignee: nobody → dtownsend+bugmail
Flags: needinfo?(dtownsend+bugmail)
Assignee | ||
Comment 1•12 years ago
|
||
The problem here is that you're trying to pass an SDK wrapper around the active window to an XPCOM component which doesn't understand it. Until we implement file picker support in the SDK you'll need to use this: var window_utils = require("window/utils") ... fp.init(window_utils.getMostRecentBrowserWindow(), "Save File...", nsIFilePicker.modeSave);
Flags: needinfo?(dtownsend+bugmail)
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•