rem: try { this.loadPreferences(); } catch(e) { this.calendarPref.setBoolPref( "alarms.show", true ); this.calendarPref.setBoolPref( "alarms.playsound", false ); this.calendarPref.setIntPref( "date.format", 0 ); this.calendarPref.setIntPref( "week.start", 0 ); this.calendarPref.setIntPref( "event.defaultlength", 60 ); this.calendarPref.setIntPref( "alarms.defaultsnoozelength", 10 ); this.calendarPref.setCharPref( "categories.names", getDefaultCategories() ); this.calendarPref.setIntPref( "servers.count", 1 ); this.calendarPref.setBoolPref( "servers.reloadonlaunch", false ); this.loadPreferences(); }   
add: this.loadPreferences(); 
context: function calendarPreferences( CalendarWindow ){   function getDefaultCategories()   {        try {         var categoriesStringBundle = srGetStrBundle("chrome://calendar/locale/categories.properties");         return categoriesStringBundle.GetStringFromName("categories" );      }      catch(e) { return "" }   }      window.calendarPrefObserver = new calendarPrefObserver( this );      this.calendarWindow = CalendarWindow;   this.arrayOfPrefs = new Object();      this.calendarPref = prefService.getBranch("calendar."); // preferences calendar node      // read prefs or set Defaults on the first run  try {    this.loadPreferences();    }  catch(e) {     this.calendarPref.setBoolPref( "alarms.show", true );     this.calendarPref.setBoolPref( "alarms.playsound", false );     this.calendarPref.setIntPref( "date.format", 0 );     this.calendarPref.setIntPref( "week.start", 0 );     this.calendarPref.setIntPref( "event.defaultlength", 60 );     this.calendarPref.setIntPref( "alarms.defaultsnoozelength", 10 );     this.calendarPref.setCharPref( "categories.names", getDefaultCategories() );     this.calendarPref.setIntPref( "servers.count", 1 ); //this counts the default server as well, so its 1.     this.calendarPref.setBoolPref( "servers.reloadonlaunch", false ); //do we reload the remote servers on launch?     this.loadPreferences();  }    }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/af97d7cf740ab144636dfd5c7fafc02b88510073/rootCalendarPref.js/buggy/calendar/resources/content/pref/rootCalendarPref.js