Participants is "undefined" on trunk

RESOLVED FIXED in 0.3a1

Status

Instantbird
Conversation
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: clokep, Assigned: clokep)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
*** Original post on bio 499 at 2010-09-12 18:41:00 UTC ***

The number of participants in a chat room is "undefined" on trunk (Mozilla2).  There are no errors in the error console.
*** Original post on bio 499 at 2010-09-12 18:49:46 UTC ***

The count is updated here:

https://hg.instantbird.org/instantbird/file/6aa4d3dd20e7/instantbird/content/conversation.xml#l729

It's using __count__ which was deprecated if I recall correctly.
(Assignee)

Comment 2

4 years ago
*** Original post on bio 499 at 2010-09-12 18:53:59 UTC ***

Its deprecated in Gecko 2: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object#Properties_2
https://bugzilla.mozilla.org/show_bug.cgi?id=551529

Looking for a work around...
(Assignee)

Comment 3

4 years ago
Created attachment 8352095 [details] [diff] [review]
The ES5 fix

*** Original post on bio 499 as attmnt 353 at 2010-09-12 19:12:00 UTC ***

According to the bug there is an "ES5" way to get # of properties of an object. I found you can use "Object.keys(someObject).length" to do it: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys

This is verified working for me
Attachment #8352095 - Flags: review?(florian)
(Assignee)

Updated

4 years ago
Assignee: nobody → clokep
Status: NEW → ASSIGNED
Comment on attachment 8352095 [details] [diff] [review]
The ES5 fix

*** Original change on bio 499 attmnt 353 at 2010-09-12 20:53:31 UTC ***

Thank you so much for jumping on this and providing a good fix even before I had time to investigate the issue.
Attachment #8352095 - Flags: review?(florian) → review+
*** Original post on bio 499 at 2010-09-13 11:00:34 UTC ***

The fix was checked-in yesterday:
https://hg.instantbird.org/instantbird/rev/859eafe43f67
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
OS: Windows 7 → All
Hardware: x86 → All
(Assignee)

Comment 6

4 years ago
*** Original post on bio 499 at 2011-04-13 15:58:39 UTC ***

Cleaning up some old bugs to add milestones.
Target Milestone: --- → 0.3a1
You need to log in before you can comment on or make changes to this bug.