context:     init: function(icalData) {        this.mItemList = new Array();        var icsService = Cc["@mozilla.org/calendar/ics-service;1"]                         .getService(Components.interfaces.calIICSService);        var rootComp = icsService.parseICS(icalData);        var calComp;        // libical returns the vcalendar component if there is just        // one vcalendar. If there are multiple vcalendars, it returns        // an xroot component, with those vcalendar children. We need to        // handle both cases.        if (rootComp.componentType == 'VCALENDAR') {            calComp = rootComp;        } else {            calComp = rootComp.getFirstSubcomponent('VCALENDAR');        }        // Get the method property out of the calendar to set our methods        var method = calComp.method;        // We set both methods now for safety's sake. It is the iTIP        // processor's responsibility to properly ascertain what the correct        // response method is (using user feedback, pref's etc) for this given        // ReceivedMethod        this.mReceivedMethod = method;        this.mResponseMethod = method;        while (calComp) {            var subComp = calComp.getFirstSubcomponent("ANY");            while (subComp) {                switch (subComp.componentType) {                case "VEVENT":                    var event = Cc["@mozilla.org/calendar/event;1"]                                .createInstance(Ci.calIEvent);                    event.icalComponent = subComp;                    this.mItemList.push(event);                    break;                case "VTODO":                    var todo = Cc["@mozilla.org/calendar/todo;1"]                               .createInstance(Ci.calITodo);                    todo.icalComponent = subComp;                    this.mItemList.push(todo);                    break;                default:                    // Nothing -- Bug 185537: Implement Freebusy, VJournal etc.                }                subComp = calComp.getNextSubcomponent("ANY");            }            calComp = rootComp.getNextSubcomponent('VCALENDAR');        }        this.mIsInitialized = true;    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/16b778a36558e7eea45ddf2d232f6a25341df0e2/calItipItem.js/clean/calendar/base/src/calItipItem.js