PLEASE HELP, PLEASE PRETTY PLEASE
[email protected] (Sean) 14 Dec 2002 12:23:01 -0800
| Newsgroups | gmane.comp.mozilla.devel.xpcom |
|---|---|
| Organization | http://groups.google.com/ |
| Message-ID | <[email protected]> |
Can someone tell me how to unwrap a JSObject that I pass into
XPCom/XPConnect
For example:
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
const nsISupportsArray = Components.interfaces.nsISupportsArray;
var x = Components.classes["@mozilla.org/supports-array;1"].createInstance(nsISupportsArray);
var y = new Object();
y.foo = "Hello XPConnect!";
x.Append(y);
//NOW I WANT TO GET MY OBJECT BACK!!!
var z = x.GetElementAt(0);
alert(z) //displays [xpconnect wrapper nsISupports]
alert(z.foo) //undefined ?????????? WHY????????
Thanx
Sean
[email protected]