Well, for the moment I have evaded this issue by opening a dummy window and calling window.openDialog() from there... ;-)
Boris Zbarsky schrieb: > Norbert Püschel wrote: >> Well, unfortuntely these examples don't help and don't seem to work. >> The first and second example only show code that passes strings, not >> objects. > > No. They pass nsIDialogParamBlock objects. What those store is a > separate question; please see that interface. > Well, I have checked that interface. Unfortunately it doesn't tell how to pass objects, only strings and numbers. >> The third example is exactly what I tried to do > > No. The third example is very unclear, but it passes an XPCOM object > (as the page title says). You're passing in a JSObject, which gets > coerced to nsISupports. So on the other end the dialog sees an > nsISupports. > > If you want it to see random properties of your JSObject, either you > need to define and implement an interface that your JSObject implements > or you need to use wrappedJSObject stuff on both ends. > >> but unfortunately it simply doesn't work as documented! > > It certainly does; the documentation just isn't very clear. > > -Boris OK, I want to use exiting code that references window.arguments[0].abURI (a string) and window.arguments[0].card (a nsIAbCard). So how would I wrap these two things so openWindow passes them along? How does window.openDialog() manage this - my workaround code passes these two as an JSObject, and it works. And who designs such weird interfaces... ;-) Norbert _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
