Closed Bug 321378 Opened 19 years ago Closed 19 years ago

calEvent::getOccurrencesBetween error when all views haven't been initialized

Categories

(Calendar :: Sunbird Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jminta, Assigned: jminta)

References

Details

(Keywords: regression)

Attachments

(1 file)

If you add/modify/delete an event before showing all the views, an error is thrown by the views that have not been shown.  They each try to get the occurrences of the event that are in their display range, but since they have no startdate, you get an error.  This was identified by gekacheka in https://bugzilla.mozilla.org/show_bug.cgi?id=297934#c34
This patch uses the same trick that Lightning does.  It avoids adding observers until the view has actually been shown.  Then, since the view has been shown, there must be a start/end date, and the onAddItem, etc methods can be called without a problem.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #206763 - Flags: first-review?(mvl)
Comment on attachment 206763 [details] [diff] [review]
don't add observers until view is shown

r=mvl
Attachment #206763 - Flags: first-review?(mvl) → first-review+
patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: