Closed Bug 239380 Opened 20 years ago Closed 6 years ago

nsIAutoCompleteController should have a way of adding search objects

Categories

(Toolkit :: Autocomplete, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: stef, Unassigned)

References

Details

Attachments

(1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040401 Firefox/0.8.0+

The Firefox implementation of auto complete has no way to add a
nsIAutoCompleteSearch object for a autocomplete text box. I'm designing an XUL
app and I need context specific autocomplete searches. Mozilla XPFE has this
functionality but the new toolkit is missing it. 

If there's no objections, I'd add the following methods to the
nsIAutoCompleteController interface:

void addSearch(in nsIAutoCompleteSearch search);
void removeSearch(in nsIAutoCompleteSearch search);

I'm willing to prepare a patch. But before I do I just wanted to check if
there's a reason this functionality was removed?


Reproducible: Always
Steps to Reproduce:
(In reply to comment #0) 
>  
> I'm willing to prepare a patch. But before I do I just wanted to check if 
> there's a reason this functionality was removed? 
 
The person who most likely removed it has long since left the project so it's 
unlikely we'll know for sure unless there was a comment in the CVS logs or 
something. 
 
Go ahead and prepare your patch and have Ben review it on its own merits 
rather than pondering what may have happened 18 or so months ago :) 
 
Confirming 
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'd check CVS logs, but I don't think this is a bad thing.  A lot of what was
done was browser-centric, but that may not have been the reason.
Attached patch Implementation patch (obsolete) — Splinter Review
Here's the implementation. I'm going to use this patch for a few days and see
if anything turns up.

Notes:
- nsAutoCompleteController seems to want mSearches and mResults to 
  be in sync (index-wise) in some places, so care is taken for that.
- Interface UUID changed when updating nsIAutoCompleteController.
Attachment #145355 - Flags: review?(bugs)
Mass edit: Changing QA to default QA Contact
QA Contact: davidpjames → password.manager
Mass edit: Setting correct QA for location bar/autocomplete. My bad. I forgot I had once been Autocomplete QA too. Hmm, why can't I just set the QA of bugs to the default QA of the component in a mass edit rather than having to do it manually...?
QA Contact: password.manager → location.bar
Assignee: bugs → nobody
Comment on attachment 145355 [details] [diff] [review]
Implementation patch

This patch no longer applies to current trunk, unfortunately. Nate, are you still interested in adding this functionality?
Attachment #145355 - Attachment is obsolete: true
Attachment #145355 - Flags: review?(bugs)
Component: Location Bar and Autocomplete → Autocomplete
Product: Firefox → Toolkit
QA Contact: location.bar → autocomplete
Version: unspecified → Trunk
Not really, no. I'm no longer working on the application which needed this. Sorry bout that. 
See Also: → 1300993
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: