Or if all else fails, use @mozilla.org/file/directory_service;1 and 
@mozilla.org/network/file-input-stream;1.

Rich

Benjamin Smedberg wrote:
> mlabs wrote:
> 
>> version ...I have this XML file sitting on the local filesystem in an
>> arbitrary folder, say c:\foo\settings.xml .. and the js component
>> could not load this .. so for example:
>> xmlDoc.load('c:\foo\settings.xml') would throw an error, but if I
> 
> Is it throwing a security error? If so, you could try wrapping the call like 
> so:
> 
> function openURI(uri) {
>   netscape.security.PrivilegeManager.
>     enablePrivilege('UniversalBrowserRead');
>   var xml = new XMLHttpRequest();
>   xml.load(uri);
> }
> 
> IIRC there was some stupid problem where JS component code was granted
> UniversalXPConnect but not UniversalBrowserRead.
> 
>> re: examples - I was wanting to see how to build the stuff, more than
>> anything else... mac-intel .. mac-ppc ... oh and in the case of the
>> cpp dll, I take it we don't need a DllMain on Mac? Or do we..?
> 
> The easiest way to build a binary XPCOM component is to use the Mozilla
> build system. See
> http://developer.mozilla.org/en/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System
> 
> --BDS
> _______________________________________________
> 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

Reply via email to