rem:  var handlerApp; 
context:   chooseApp: function(aEvent) {    // Don't let the normal "on select action" handler get this event,    // as we handle it specially ourselves.    aEvent.stopPropagation();    var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);    var winTitle = this._prefsBundle.getString("fpTitleChooseApp");    fp.init(window, winTitle, Ci.nsIFilePicker.modeOpen);    fp.appendFilters(Ci.nsIFilePicker.filterApps);    var handlerApp;    // Prompt the user to pick an app.  If they pick one, and it's a valid    // selection, then add it to the list of possible handlers.    if (fp.show() == Ci.nsIFilePicker.returnOK && fp.file &&        this._isValidHandlerExecutable(fp.file)) {      handlerApp = Cc["@mozilla.org/uriloader/local-handler-app;1"].                   createInstance(Ci.nsILocalHandlerApp);      handlerApp.name = getDisplayNameForFile(fp.file);      handlerApp.executable = fp.file;      // Add the app to the type's list of possible handlers.      let handlerInfo = this._handledTypes[this._list.selectedItem.type];      handlerInfo.possibleApplicationHandlers.appendElement(handlerApp, false);    }    // Rebuild the actions menu whether the user picked an app or canceled.    // If they picked an app, we want to add the app to the menu and select it.    // If they canceled, we want to go back to their previous selection.    this.rebuildActionsMenu();    // If the user picked a new app from the menu, select it.    if (handlerApp) {      let typeItem = this._list.selectedItem;      let actionsMenu =        document.getAnonymousElementByAttribute(typeItem, "class", "actionsMenu");      let menuItems = actionsMenu.menupopup.childNodes;      for (let i = 0; i < menuItems.length; i++) {        let menuItem = menuItems[i];        if (menuItem.handlerApp && menuItem.handlerApp.equals(handlerApp)) {          actionsMenu.selectedIndex = i;          this.onSelectAction(menuItem);          break;        }      }    }  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/ac256d7de4ff9667f28f18337eaf8713dcc3d7f9/applications.js/clean/browser/components/preferences/applications.js