rem: var filePicker = Components.classes["component: if (filePicker) filePicker = filePicker.QueryInterface(Components.interfaces.nsIFilePicker); 
add: const nsIFilePicker = Components.interfaces.nsIFilePicker; var filePicker = Components.classes["component: 
context: function chooseApp(){  var filePicker = Components.classes["component://mozilla/filepicker"].createInstance();  if (filePicker)    filePicker = filePicker.QueryInterface(Components.interfaces.nsIFilePicker);  if (filePicker) {    const FP = Components.interfaces.nsIFilePicker    var windowTitle = gBundle.GetStringFromName("chooseHandler");    var programsFilter = gBundle.GetStringFromName("programsFilter");    filePicker.init(window, windowTitle, FP.modeOpen);    if (navigator.platform == "Windows")      filePicker.appendFilter(programsFilter, "*.exe; *.com");    else      filePicker.appendFilters(FP.filterAll);    filePicker.show();    var file = filePicker.file.QueryInterface(Components.interfaces.nsILocalFile);    gAppPath.value = file.path;    gAppPath.select();  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b2484bf94bbc2a435b0677a9da558501dd10a09d/pref-applications-new.js/clean/xpfe/components/prefwindow/resources/content/pref-applications-new.js