rem: editNewEvent( calendarEvent, calendar ); 
add: createEventWithDialog(calendar, null, null, null, calendarEvent); 
context: function newEvent(startDate, endDate, allDay){   // create a new event to be edited and added   var calendarEvent = createEvent();   if (!startDate) {       startDate = gCalendarWindow.currentView.getNewEventDate();   }   calendarEvent.startDate.jsDate = startDate;   if (!endDate) {       var MinutesToAddOn = getIntPref(gCalendarWindow.calendarPreferences.calendarPref, "event.defaultlength", gCalendarBundle.getString("defaultEventLength" ) );              endDate = new Date(startDate);       endDate.setMinutes(endDate.getMinutes() + MinutesToAddOn);   }   calendarEvent.endDate.jsDate = endDate   var prefService = Components.classes["@mozilla.org/preferences-service;1"]                               .getService(Components.interfaces.nsIPrefService);   var alarmsBranch = prefService.getBranch("calendar.alarms.");   if (alarmsBranch.getIntPref("onforevents") == 1) {       // alarmTime doesn't matter, it just can't be null       calendarEvent.alarmTime = createDateTime();       calendarEvent.setProperty("alarmUnits", alarmsBranch.getCharPref("eventalarmunit"));       calendarEvent.setProperty("alarmLength", alarmsBranch.getIntPref("eventalarmlen"));       calendarEvent.setProperty("alarmRelation", "START");   }   if (allDay)       calendarEvent.startDate.isDate = true;   var calendar = getSelectedCalendarOrNull();   editNewEvent( calendarEvent, calendar );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/edb75cb3aa7fe2a0098e7d7a97a91ce5dd7f6556/calendar.js/buggy/calendar/resources/content/calendar.js