Closed
Bug 582494
Opened 15 years ago
Closed 14 years ago
Lookup implementors of nsIAutoCompleteResult
Categories
(Core Graveyard :: Tracking, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dzbarsky, Assigned: dzbarsky)
References
Details
Attachments
(1 file, 3 obsolete files)
|
12.83 KB,
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
The fix for Bug 556007 introduces nsIAutoCompleteResult::GetActualValueAt which returns the value that should be placed into the element. (this may be different from the displayed value, as in the case of Bug 556007).
To preserve existing behavior, we should add
GetActualValueAt(PRInt32 aIndex, nsAString& _retval)
{
return GetValueAt(aIndex, _retval);
}
to the implementers of nsIAutoCompleteResult
Comment 1•15 years ago
|
||
Out of interest, why wasn't the new method called GetLabelAt? (This is the terminology we use for XUL menulists, but it doesn't necessarily make sense for autocomplete, so I thought I'd ask.) Anyway, implementers appear to include:
mailnews/db/gloda/components/glautocomp.js
mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
mailnews/addrbook/src/nsAbAutoCompleteSearch.js
Also mailnews/addrbook/public/nsIAbAutoCompleteResult.idl needs a new uuid.
| Assignee | ||
Comment 2•15 years ago
|
||
Hmmm it's not really a label, its the actual value that will be filled in. (and submitted to the server if its a form, etc.)
Why do those need to be changed? The places you listed seem to be comm-central, while my patch modifies nsIAutoCompleteResult in mozilla-central.
| Assignee | ||
Comment 3•15 years ago
|
||
Sorry, you were right. I will update these. I think some tests may also need updates.
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → dzbarsky
| Assignee | ||
Comment 4•15 years ago
|
||
Attachment #461474 -
Flags: review?(neil)
| Assignee | ||
Updated•15 years ago
|
Attachment #461474 -
Flags: review?(neil) → review?(neil)
| Assignee | ||
Updated•15 years ago
|
Attachment #461474 -
Flags: review?(neil)
| Assignee | ||
Updated•15 years ago
|
Attachment #461474 -
Flags: review?(neil)
Comment 5•15 years ago
|
||
(In reply to comment #2)
> Hmmm it's not really a label, its the actual value that will be filled in. (and
> submitted to the server if its a form, etc.)
Actually I was thinking that the label would be the displayed value and the value would be the actual value filled in.
Comment 6•15 years ago
|
||
Comment on attachment 461474 [details] [diff] [review]
Fix up the implementers and tests
> getValueAt: function getValueAt(aIndex) {
> return this._searchResults[aIndex].value;
> },
>
>+ getActualValueAt: function getActualValueAt(aIndex) {
>+ return getValueAt(aIndex);
>+ },
This doesn't work in JavaScript; unlike C++, object members aren't in scope.
> getValueAt: function getValueAt(aIndex) {
> return this._searchResults[aIndex].value;
> },
>
>+ getActualValueAt: function getActualValueAt(aIndex) {
>+ return this._searchResults[aIndex].value;
>+ },
Half the cases you duplicated the method, and the other half you tried to reuse getValue at... the inconsistency looks odd.
Attachment #461474 -
Flags: review?(neil) → review-
| Assignee | ||
Comment 7•15 years ago
|
||
Sorry, I should have been more careful when I was writing this
Attachment #461474 -
Attachment is obsolete: true
Attachment #461669 -
Flags: review?(neil)
| Assignee | ||
Comment 8•15 years ago
|
||
Attachment #461669 -
Attachment is obsolete: true
Attachment #461669 -
Flags: review?(neil)
| Assignee | ||
Comment 9•15 years ago
|
||
Attachment #461810 -
Attachment is obsolete: true
Comment 10•15 years ago
|
||
(In reply to comment #9)
> Created attachment 461811 [details] [diff] [review]
> Fix up the implementers and tests r=enndeakin
^^^^^^^^^^^
Did you mean that? ;-)
Comment 12•15 years ago
|
||
Comment on attachment 461811 [details] [diff] [review]
[checked in] Fix up the implementers and tests
This looks good, thanks for doing the patch. r=Standard8. I'll land this on your behalf as well so we can get the errors fixed.
Attachment #461811 -
Attachment description: Fix up the implementers and tests r=enndeakin → Fix up the implementers and tests
Attachment #461811 -
Flags: review+
Comment 13•15 years ago
|
||
Comment on attachment 461811 [details] [diff] [review]
[checked in] Fix up the implementers and tests
Checked in: http://hg.mozilla.org/comm-central/rev/36c82cd8464d
I don't know if you have anything else to cover in this bug, so leaving open for now.
Attachment #461811 -
Attachment description: Fix up the implementers and tests → [checked in] Fix up the implementers and tests
| Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•