rem: thisCalendar.observeAddItem(newItem); 
add: thisCalendar.observeAddItem(aItem); 
context:         function onPutComplete(aStatusCode, aResource, aOperation, aClosure) {            // 201 = HTTP "Created"            //            if (aStatusCode == 201) {                debug("Item added successfully\n");                var retVal = Components.results.NS_OK;            } else if (aStatusCode == 200) {                // XXXdmose once we get etag stuff working, this should                //                 debug("200 received from clients, until we have etags working"                      + " this probably means a collision; after that it'll"                      + " mean server malfunction/n");                retVal = Components.results.NS_ERROR_FAILURE;            } else {                if (aStatusCode > 999) {                    aStatusCode = "0x" + aStatusCode.toString(16);                }                // XXX real error handling                debug("Error adding item: " + aStatusCode + "\n");                retVal = Components.results.NS_ERROR_FAILURE;            }            // notify the listener            if (aListener) {                try {                    aListener.onOperationComplete(thisCalendar,                                                  retVal,                                                  aListener.ADD,                                                  newItem.id,                                                  newItem);                } catch (ex) {                    debug("addItem's onOperationComplete threw an exception "                          + ex + "; ignoring\n");                }            }            // notify observers            if (Components.isSuccessCode(retVal)) {                thisCalendar.observeAddItem(newItem);            }        }
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/f8027f6beb4df2982bdc7812bf62f2e40adce288/calDavCalendar.js/buggy/calendar/providers/caldav/calDavCalendar.js