Closed
Bug 370591
Opened 19 years ago
Closed 19 years ago
Restrict history duration input with a formatter
Categories
(Camino Graveyard :: Preferences, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stuart.morgan+bugzilla, Assigned: stuart.morgan+bugzilla)
Details
(Keywords: fixed1.8.1.5)
Attachments
(1 file, 1 obsolete file)
|
6.00 KB,
patch
|
froodian
:
review+
mikepinkerton
:
superreview+
|
Details | Diff | Splinter Review |
We should be using a formatter to restrict the history duration pref input to the characters we want, rather than allowing arbitrary input and then beeping if we don't like it.
Attachment #255310 -
Flags: review?(stridey)
| Assignee | ||
Comment 1•19 years ago
|
||
Since I'm in there, some more cleanup for kicks.
I know I said I wouldn't do any more cleanup before 1.1, but I felt like writing this. It's not really risky since it's so self-contained, but it's also not likely to rot so I don't really care if it sits for a little while; your call.
Assignee: nobody → stuart.morgan
Attachment #255310 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #255313 -
Flags: review?(stridey)
Attachment #255310 -
Flags: review?(stridey)
Comment 2•19 years ago
|
||
Comment on attachment 255313 [details] [diff] [review]
with more cleanup
r=me, sorry about the wait.
Attachment #255313 -
Flags: superreview?(mikepinkerton)
Attachment #255313 -
Flags: review?(froodian)
Attachment #255313 -
Flags: review+
Comment 3•19 years ago
|
||
Comment on attachment 255313 [details] [diff] [review]
with more cleanup
sr=pink
+ *anObject = [NSNumber numberWithInt:[string intValue]];
+ return YES;
what if |string| is something wonky and |-intValue| chokes and returns nil? Should we check |*anObject| for something valid before returning YES? Can intValue toss an exception?
Attachment #255313 -
Flags: superreview?(mikepinkerton) → superreview+
| Assignee | ||
Comment 4•19 years ago
|
||
(In reply to comment #3)
> what if |string| is something wonky and |-intValue| chokes and returns nil?
intValue returns an int, not a number object; if it can't find anything numeric at the beginning of the string it returns 0, which is fine here.
| Assignee | ||
Comment 5•19 years ago
|
||
Checked in on trunk and MOZILLA_1_8_BRANCH
You need to log in
before you can comment on or make changes to this bug.
Description
•