On 12/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
That setup page seems out of date, at least for my FF version 2.0: It mentions browser.dom.window.dump.enabled which is not in my about:config;
So add it.
it also refers to the -console flag, which gets a complaint in the error log.
And still works. The message in the console is a known bug.
toJavaScriptConsole() is not defined,
It is defined in browser.xul overlays. Where is it mentioned?
and dump() seems to be a no-op.
Not if you run with -console and actually enable the said pref. You need to set the prefs and check if there's anything interesting in the JS console. Nickolay
Anyway, I've sprinkled a lot of alert() calls in the js, and a bunch of MessageBox in my C++, and they're all getting called (except for the one that says my callback was called from C++). -----Original Message----- From: Nickolay Ponomarev [mailto:[EMAIL PROTECTED] Sent: Monday, December 04, 2006 3:51 PM To: Schmidt, Paul Cc: [email protected] Subject: Re: XPCOM cpp to js callback On 12/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > And to reveal more of my newbie-ness: how do I open the error console in > FireFox? > Tools -> Error (or JavaScript) Console and you should read this: http://kb.mozillazine.org/Setting_up_extension_development_environment#S et_development_prefs Nickolay > Thanks! > > -Paul > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of John > Bandhauer > Sent: Monday, December 04, 2006 3:30 PM > To: [email protected] > Subject: Re: XPCOM cpp to js callback > > Are you so sure your callback is not getting called? If your js code > is not still the loaded document in some window then it's global > object might not still *have* an 'alert' method and *that* might be > the cause of the generic failure code. > > Have you looked in the error console for interesting error info? > > If XPConnect were having difficulty calling your method then you > should expect it to likely return a more interesting nsresult than the > generic failure code. > > Your JS obj is not going to get as many QI calls as you expect. > XPConnect will try a QI for nsISupports to establish object identity > in some cases. But, inasmuch as JS objects are not even required to > implement QI, the fact that your object is not QI'd for your special > interface is not telling. XPConnect *trusts* you when you pass the > object as an instance of your interface. It builds a wrapper to > represent that interface for you and hands it to your C++ code. > > I'm pretty sure that nsCOMPtr assignment does not require a QI call in > the normal case either. It is assigning typed pointers and doing ref > counting only. > > John. > _______________________________________________ > dev-tech-xpcom mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-xpcom > _______________________________________________ > dev-tech-xpcom mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-xpcom >
_______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
