rem: event.isPrivate = getFieldValue( "private-checkbox", "checked" ); 
add: if (getFieldValue("private-checkbox", "checked")) event.privacy = "PRIVATE"; else event.privacy = "PUBLIC"; 
context: function onOKCommand(){    event = gEvent;    // if this event isn't mutable, we need to clone it like a sheep    var originalEvent = event;    if (!event.isMutable)        // I will cut vlad for making me do this QI        event = originalEvent.clone().QueryInterface(Components.interfaces.calIEvent);    // get values from the form and put them into the event    // calIEvent properties    event.startDate.jsDate = gStartDate;    event.endDate.jsDate   = gEndDate;    event.isAllDay = getFieldValue( "all-day-event-checkbox", "checked" );    // calIItemBase properties    event.title = getFieldValue( "title-field" );    event.isPrivate = getFieldValue( "private-checkbox", "checked" );    if (getFieldValue( "alarm-type" ) != "" && getFieldValue( "alarm-type" ) != "none")        event.hasAlarm == 1    if (event.hasAlarm) {        alarmLength = getFieldValue( "alarm-length-field" );        alarmUnits  = getFieldValue( "alarm-length-units", "value" );    //event.alarmTime = ...    }    event.recurrenceInfo = null;        if (getFieldValue("repeat-checkbox", "checked")) {        recurrenceInfo = createRecurrenceInfo();        recurUnits    = getFieldValue("repeat-length-units", "value");    recurForever  = getFieldValue("repeat-forever-radio", "selected");    recurInterval = getFieldValue("repeat-length-field");    recurCount    = (getFieldValue("repeat-numberoftimes-radio", "selected")        ? Math.max(1, getFieldValue("repeat-numberoftimes-textbox"))        : 0); // 0 means not selected.    //recurrenceInfo.recurType = ...    //recurrenceInfo.recurEnd = ...    }    // other properties    event.setProperty('categories',  getFieldValue("categories-field", "value"));    event.setProperty('description', getFieldValue("description-field"));    event.setProperty('location',    getFieldValue("location-field"));    event.setProperty('url',         getFieldValue("uri-field"));    event.setProperty("ICAL_RELATED_PARAMETER", getFieldValue("alarm-trigger-relation", "value"));    if (getFieldValue("alarm-type") == "email" )        event.setProperty('alarmEmailAddress', getFieldValue("alarm-email-field", "value"));    else        event.deleteProperty('alarmEmailAddress');    /*      if( getFieldValue( "status-field" ) != "" )          gEvent.status      = eval( "gEvent."+getFieldValue( "status-field" ) );    */    if (getFieldValue("invite-checkbox", "checked"))        event.setProperty('inviteEmailAddress', getFieldValue("invite-email-field", "value"));    else        event.deleteProperty('inviteEmailAddress');   /* EXCEPTIONS */   /*   gEvent.removeAllExceptions();   var listbox = document.getElementById( "exception-dates-listbox" );   var i;   for( i = 0; i < listbox.childNodes.length; i++ )   {      var dateObj = new Date( );      dateObj.setTime( listbox.childNodes[i].value );      gEvent.addException( dateObj );   }*/    /* File attachments */    //loop over the items in the listbox    //event.attachments.clear();    var attachmentListbox = document.getElementById( "attachmentBucket" );    for (i = 0; i < attachmentListbox.childNodes.length; i++) {        attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"].createInstance(Components.interfaces.nsIMsgAttachment);    attachment.url = attachmentListbox.childNodes[i].getAttribute("label");    // XXX    //event.attachments.appendElement(attachment);    }    // Attach any specified contacts to the event    if (gEventCardArray) {        try {            // Remove any existing contacts            //event.contacts.clear();            // Add specified contacts            for (var cardId in gEventCardArray)                if (gEventCardArray[cardId]) {                    // XXX                    //event.contacts.appendElement(gEventCardArray[cardId]);                }        }        catch (e)        {        }    }   var Server = getFieldValue( "server-field" );   // :TODO: REALLY only do this if the alarm or start settings change.?   //if the end time is later than the start time... alert the user using text from the dtd.   // call caller's on OK function   gOnOkFunction(event, Server, originalEvent);   // tell standard dialog stuff to close the dialog   return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4cf75d27d9a59bba5e4aa97a89adccc99ae4da8d/eventDialog.js/clean/calendar/resources/content/eventDialog.js