osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: newbie UniversalXPConnect problem - msg#00018

List: mozilla.devel.xpcom

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

Phil Wilson wrote:
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

To use that, that code must either be a local file, a signed script, or codebase principal support must be enabled (with a pref:
user_pref("signed.applets.codebase_principal_support", true);
)





Thread at a glance:

Previous Message by Date:

newbie UniversalXPConnect problem

Hi all, Apologies for the newbie question (!) I have some code which executes netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); but i'm never being prompted to accept it, and the console always returns "Error: uncaught exception: enablePrivilege not granted". This also happens when I try and run the XPConnect samples at http://lxr.mozilla.org/mozilla/source/xpcom/sample/xpconnect-sample.html Is my syntax for UniversalXPConnect out of date? Or have I accidentally knocked some setting which always refuses UniversalXPConnect requests? TIA, phil

Next Message by Date:

Re: Postscript file generation

On Tuesday 16 July 2002 10:56 pm, user@xxxxxxxxxxxxxxxxxxxxxxxxxxx wrote: | This is functionality that I am interested in as well. Currently I am | using a tool called HTMLDoc to render HTML to PostScript. However, I | would much rather prefer to use the gecko to render the layout of HTML, | CSS, etc. since it is much more standards compliant. | | I will personally do more research into XPCOM as well ( I am a mozilla | API newbie). I'll keep you in mind as I get more info and do some | prototyping. Perhaps we can colaborate on this tool. | There is no need to reinvent the wheel. Konqueror web browser (http://www.konqueror.org) already does all this, and you can control it from command line via DCOP interface (fully scriptable from command line) Konqueror prints nice to both PostScript and PDF (I use ver. 3.0.2), and you don't need to learch any new APIs to acomplish this task. Regards, Vadim | -Misk | | Jeff Putney wrote: | > I would like to write a command line utility that takes a URI as input | > and renders to a postscript file. I've not done any mozilla hacking, so | > I am not quite sure how to go about doing this. From what I gather, | > I'll need to use XPCOM to setup a postscript rendering context and then | > use some XPCOM object to load and render the URI. In theory this should | > be fairly straight forward. Mozilla already has all the functionality I | > want. However I am not familiar with how to write a program that can | > use XPCOM, nor which objects I will need to use outside of gfs/src/ps. I | > have read some of the XPCOM introduction which gives info on writing | > XPCOM objects, but not so much on writing a program that uses XPCOM | > objects, especially information on linking and probably where shared | > objects should be installed for dynamic loading. | > | > Any insight whatsoever would be greatly appreciated. I understand that | > this may be a non-trivial task, but given that mozilla already does | > this, it should be 'a simple matter of programming', or at least I hope | > it will be. | > | > --jeff -- Vadim Plessky http://kde2.newmail.ru (English) 33 Window Decorations and 6 Widget Styles for KDE http://kde2.newmail.ru/kde_themes.html KDE mini-Themes http://kde2.newmail.ru/themes/

Previous Message by Thread:

newbie UniversalXPConnect problem

Hi all, Apologies for the newbie question (!) I have some code which executes netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); but i'm never being prompted to accept it, and the console always returns "Error: uncaught exception: enablePrivilege not granted". This also happens when I try and run the XPConnect samples at http://lxr.mozilla.org/mozilla/source/xpcom/sample/xpconnect-sample.html Is my syntax for UniversalXPConnect out of date? Or have I accidentally knocked some setting which always refuses UniversalXPConnect requests? TIA, phil

Next Message by Thread:

Re: newbie UniversalXPConnect problem

Thanks Christian, I'm trying to run my file locally, and it will always be run locally. The privilege is refused when I try and run it locally - whether it be from within my file manager or through a local webserver. Of course, in typical newbie style, "It worked yesterday" and I really don't see what I'm doing wrong. My code is this: try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch (e) { alert("Universal Connect was refused"); } and the exception is always thrown. Christian Biesinger wrote: Phil Wilson wrote: netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); To use that, that code must either be a local file, a signed script, or codebase principal support must be enabled (with a pref: user_pref("signed.applets.codebase_principal_support", true); )
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!