Hi all: I'm really stuck on this problem and hope any of your guys can help.My work is based on Netscape 6 My task is to open a XML doc on the local disk and use the XPCom's sound capability to play the href linked sound from the XML doc, the script what contains the playSound() function is pre-installed in the Chrom:// but the sound.js file is included and called from the XML document. My problem is getting the right privilege to access XPConnect interfaces. I understand that every file on the local drive is treated as an individual domain and special previlege are needed. After days of searching I found that per-file permissions maybe the solution to my problem. the information is located here : http://www.mozilla.org/projects/security/components/per-file.html I've added the following code to my scripts that already have the right privileges (cause they run from Chrome://) pref.SetBoolPref("signed.applets.codebase_principal_support", "true"); pref.SetUnicharPref("capability.principal.Reader.id", fp.fileURL.spec); pref.SetUnicharPref("capability.principal.Reader.granted","UniversalXPConnect"); so the script can add the necessary values to the preferences on the fly. immedeatly after the commands I got the values I just entered back and dump() to check the values, and the results are all correct and there are no error messages. However when I stick the same checking code in sound.js to check the pref values I get this error message [Exception... "Failure" code: "-2147467259" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "jar:resource:///chrome/reader.jar!/content/sound.js Line:52"] when I execute this statement prefV = navigator.preference('capability.principal.Reader.id'); why does this happen ? I though there is only one preference in each instance of the browser ? And ofcourse I didn't get my privilege to XPConnect interfaces. Then just to test how things work I've added manually the necessary lines into pref/all.js user_pref("capability.principal.myapp.id","file:///C|/Fabula/stories/coconuts_ca-es/coco.xml"); user_pref("capability.principal.myapp.granted","UniversalXPConnect"); but Netscape still refuses to grant me XPConnect privileges. So just to sum things up, here are my questions: 1- Am I using the correct way of enabling privilege for my local files ? if not then how should I do it ? 2- When I try to get my newly added preference values from sound.js, why is the error message ? 3- Why my set preferences don't work ? 4- I've also tried to use pref.SavePrefFile() to save the preference to the disk, though no error message is shown, but the local pref js files don't seem to be modified. why ? 5. Finally, if anyone understood what am I talking about, please give some clues about the problem, cause it's driving me mad. thanks for all your time and patience. [EMAIL PROTECTED] Eric
