Closed Bug 359016 Opened 18 years ago Closed 15 years ago

JS error 'this.currentItem has no properties' in calItemBase propertyEnumerator

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: thomas.benisch, Unassigned)

Details

Attachments

(1 file)

The propertyEnumerator in calItemBase returns JavaScript errors when used in calWcapCalendar.tunnelXProps(): '[JavaScript Error: "currentItem is not defined" {file: "file:///D:/Development2/pim/wntmsci10/misc/mozilla/dist/xpi-stage/lightning/js/calItemBase.js" line:339}]' when calling method: [nsISimpleEnumerator::getNext] '[JavaScript Error: "this.currentItem has no properties" {file: "file:///D:/Development2/pim/wntmsci10/misc/mozilla/dist/xpi-stage/lightning/js/calItemBase.js" line:319}]' when calling method: [nsISimpleEnumerator::hasMoreElements]
This patch fixes the JavaScript error 'currentItem is not defined'.
Attachment #244296 - Flags: first-review?(jminta)
The fix for 'currentItem is not defined' is rather trivial, see comment #1. The JavaScript error 'this.currentItem has no properties' is returned, if this.firstEnumerator and this.currentItem are null or undefined. As the whole code in hasMoreElements() seems to be a little bit hacky (e.g. why is ((this.currentItem = null) == null) needed?) this error should be fixed by someone with some more insight.
Comment on attachment 244296 [details] [diff] [review] patch for 'currentItem is not defined' r1/2=jminta, nice catch :)
Attachment #244296 - Flags: first-review?(jminta) → first-review+
patch for 'currentItem is not defined' checked in on MOZILLA_1_8_BRANCH and trunk
The patch for this was checked in back in November 2006.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
(In reply to comment #5) > The patch for this was checked in back in November 2006. That's only half of the truth. The patch fixes the first problem 'currentItem is not defined' (see description). The second problem 'this.currentItem has no properties' is still open (see comment #2). Therefore I propose to reopen this issue.
You're right, Thomas. Thanks for the information.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: JavaScript errors in calItemBase propertyEnumerator → JS error 'this.currentItem has no properties' in calItemBase propertyEnumerator
Status: REOPENED → NEW
OS: Windows XP → All
Hardware: PC → All
I think we can close this bug, the code has changed a lot and I think all relevant bits have been superseded.
Status: NEW → RESOLVED
Closed: 17 years ago15 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: