STOP SPAMMING ME FOR FUCKS SAKE!!!!!!!
----- Original Message ----- From: "Philip Chee" <[email protected]>
Newsgroups: public.mozdev.project_owners
To: <[email protected]>
Sent: Monday, November 03, 2008 5:06 AM
Subject: [Project_owners] Problem with JSLib on trunk (Gecko 1.9.1)


On trunk the following code doesn't work:

var du = new DirUtils();
var f = new File(du.getPrefsDir());

The second line causes the error:

Error: Cannot convert WrappedNative to function =
NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN

Looking at the properties of File.prototype I get:

Properties for object:
[xpconnect wrapped native prototype]


getAsText: function getAsText() {
   [native code]
}
getAsDataURL: function getAsDataURL() {
   [native code]
}
getAsBinary: function getAsBinary() {
   [native code]
}

This doesn't look like the jslib File() object at all. Looking through
DevMo I see that nsIDOMFile was added in Firefox 3. So it seems we have
a namespace clash.

<https://developer.mozilla.org/En/NsIDOMFile>

Unfortunately the extension I'm trying to update (Cookie Panel) is
orphaned, so I don't know what to do. On the JSLib side I guess you
could rename their File() object to JslibFile() or namespace it to
JsLib.File()

Phil

--
Philip Chee <[email protected]>, <[email protected]>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]And I thought *I* had problems!
* TagZilla 0.066.6

_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners

Reply via email to