rem: switch(rule.type) { case "DAILY": document.getElementById("period-list").selectedIndex = 0;  setElementValue("daily-days", rule.interval); break; case "WEEKLY": document.getElementById("period-list").selectedIndex = 1;  const byDayTable = { 1 : "sun", 2 : "mon", 3 : "tue", 4 : "wed", 5 : "thu", 6 : "fri", 7: "sat" };  for each (var i in rule.getComponent("BYDAY", {})) { setElementValue("weekly-" + byDayTable[i], "true", "checked"); } break; case "MONTHLY": document.getElementById("period-list").selectedIndex = 2; break; case "YEARLY": document.getElementById("period-list").selectedIndex = 3; break; default: dump("unable to handle your rule type!\n"); break; }  /* load up the duration of the event radiogroup */ if (rule.count == -1) { setElementValue("recurrence-duration", "forever"); } else if (rule.isByCount) { setElementValue("recurrence-duration", "ntimes"); setElementValue("repeat-ntimes-count", rule.count ); } else { setElementValue("recurrence-duration", "until"); setElementValue("repeat-until-date", rule.endDate.jsDate); } 
add: for each (exception in exceptions) { if (exception instanceof calIRecurrenceDate) { exceptionListBox.appendItem(exception.date.toString()).date = exception.date; } else if (exception instanceof calIRecurrenceDateSet) { var dateSet = exception.getDates({}); for each(date in dateSet) exceptionListBox.appendItem(date.toString()).date = date; } else dump(exception); 
context: function loadDialog(){    if (!window.originalRecurrenceInfo)        return;    var ritems = window.originalRecurrenceInfo.getRecurrenceItems({});    /* split out rules and exceptions */    var rules = [];    var exceptions = [];    for each (var r in ritems) {        if (r instanceof calIRecurrenceRule) {            if (r.isNegative)                exceptions.push(r);            else                rules.push(r);        }    }    if (rules.length > 0) {        // we only handle 1 rule currently        var rule = rules[0];        switch(rule.type) {        case "DAILY":            document.getElementById("period-list").selectedIndex = 0;            setElementValue("daily-days", rule.interval);            break;        case "WEEKLY":            document.getElementById("period-list").selectedIndex = 1;            const byDayTable = { 1 : "sun", 2 : "mon", 3 : "tue", 4 : "wed",                                 5 : "thu", 6 : "fri", 7: "sat" };            for each (var i in rule.getComponent("BYDAY", {})) {                setElementValue("weekly-" + byDayTable[i], "true", "checked");            }            break;        case "MONTHLY":            document.getElementById("period-list").selectedIndex = 2;            break;        case "YEARLY":            document.getElementById("period-list").selectedIndex = 3;            break;        default:            dump("unable to handle your rule type!\n");            break;        }        /* load up the duration of the event radiogroup */        if (rule.count == -1) {            setElementValue("recurrence-duration", "forever");        } else if (rule.isByCount) {            setElementValue("recurrence-duration", "ntimes");            setElementValue("repeat-ntimes-count", rule.count );        } else {            setElementValue("recurrence-duration", "until");            setElementValue("repeat-until-date", rule.endDate.jsDate); // XXX getInTimezone()        }            }    // XXX handle exceptions}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/39aa62b270d72f0b848c92da68df3a197b05153f/calendar-recurrence-dialog.js/clean/calendar/base/content/calendar-recurrence-dialog.js