Almost right about the parameter: it is actually a path to the file 
inside the zippy rather than an absolute path on the file system.

So if you have a zippy, say browser.xpi, with the following archive 
structure:

install.js
res_eg_1.properties
bin/res_eg_2.properties

you could use loadReasources() to load the two files as follows:

resEg1Obj = loadResources("res_eg_1.properties");
resEg2Obj = loadResources("bin/res_eg_2.properties");

Hope this helps.
~Samir


Ian Oeschger wrote:

> Don't mind at all.
> So what's the 1 param for loadResources(), just a string path to the 
> file itself? And if (as I understand you) we don't have a facility for 
> displaying the stuff from the properties file, should this go in the API 
> for now or stay out?
> 
> thanks
> -ian
> 
> Dan Veditz wrote:
> 
>> Hope you don't mind me CC'ing the newsgroup, others might have these
>> questions too.
>> 
>> Ian Oeschger wrote:
>> 
>>>  From my notes:
>>> 
>>> dveditz: What and where is the install log that gets written to in
>>> logComment()? A log doesn't seem to be explicitly created or specified
>>> in the scripts that are using it? Am I seeing some facility for
>>> displaying a web page with the log in it upon completion for web-based
>>> installs?
>> 
>> 
>> 
>> The install log is created in the product directory by default (where the
>> netscape executable is) if it can be, and if we don't have proper 
>> permission
>> the install log is written to the user's profile directory.
>> 
>> 
>>> dveditz: What does loadResources() do? What are the resources?
>> 
>> 
>> 
>> It loads an arbitrary properties file (same format as chrome locale
>> ..properties files) and returns a javascript object whose property 
>> names are
>> the keys from that file and the values are the strings. This was 
>> requested
>> by international so install scripts could be localized, although there is
>> very little opportunity for XPInstall to display script-generated text at
>> the moment.
>> 
>> -Dan Veditz


Reply via email to