nsIXULSortService should support numerical sorting

RESOLVED DUPLICATE of bug 379745

Status

()

--
enhancement
RESOLVED DUPLICATE of bug 379745
9 years ago
9 years ago

People

(Reporter: Unfocused, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

For non-template usage, nsIXULSortService sorts based on string comparison. However, it'd be very useful for it to support numerical sorting.
Blair, does it block our sorting in the new addons manager or can we use a workaround?
It's not blocking any functionality in the addons manager, no - but it is needed for code correctness. I'm using a hacky workaround at the moment, by prepending a bunch of 0's to the string and limiting the length of the string. eg: "0000000123", "0087654321".

It works, but its not the proper way of doing it, and will break for suitably large numbers.

Comment 3

9 years ago
Added a patch in bug 379745.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 379745
No longer blocks: 550048
You need to log in before you can comment on or make changes to this bug.