Closed Bug 357171 Opened 18 years ago Closed 18 years ago

nsIAutoCompleteSearch (et al) not defined

Categories

(Thunderbird :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3

People

(Reporter: ptomli.bugzilla, Assigned: ptomli.bugzilla)

References

Details

Attachments

(1 file)

Although Thunderbird used an (trunk) XPFE implementation of autocomplete, it is a sort of hybrid that allows use of the toolkit form (nsIAutoCompleteSearch) to provide results. http://lxr.mozilla.org/seamonkey/source/xpfe/components/autocomplete/resources/content/autocomplete.xml#116 references nsIAutoCompleteSearch, though it's not defined in Components.interfaces in TB 2a1. I determined that the toolkit XPCOM interfaces are not defined by var str = ''; for (var i in Components.interfaces) { str += i + "\n"; } dump(str); This means you cannot use an nsIAutoCompleteSearch as a datasource for autocomplete within TB. Apparently nsIAutoCompleteSession is deprecated, though this bug makes its use required in TB. This can be refined to a query on "is one supposed to use nsIAutoCompleteSearch or nsIAutoCompleteSession?" If the former, then it needs defining in TB, if the latter then I think it's a bug to include a reference to an undefined interface in a shipping module.
I'm not sure if it's this simple
Attachment #242736 - Flags: review?(mscott)
Paul, what are you doing to see this error? I haven't actually seen the error mentioned in the report.
I was in the process of building an nsIAutoCompleteSearch implementation in JS for Quick File. All would go well until I tried to using it as the data source for the autocomplete textbox, via autocompletesearch="mailnewsfolders", assuming I'd registered the component at "@mozilla.org/autocomplete/search;1?name=mailnewsfolders". When I opened the dialog with the autocomplete textbox, and tried to run a search, it would emit that error into the Error Log. Adding the autocomplete.xpt from an SM nightly to the components/ directory of the extension fixed the problem for me, but it really needs including in the install, so the patch should work fine. It's purely occurring when you try to use the toolkit style of autocomplete in TB, since the interfaces (autocomplete.xpt) are not included in the build, while the xpfe (xpautocomplete.xpt) are. If it would help I can knock an XPI together to demonstrate.
Neil, does it seem ok to you that our xpfe autocomplete implementation is using some interfaces from toolkit? Just wanted to double check. I know toolkit ships both implementations now thanks to the work you did.
The XPFE autocomplete widget supports both sets of interfaces. On trunk only the addressing widget still uses the xpfe interfaces. On branch you need the toolkit interfaces for the XUL filepicker which is used on Linux with a GTK version less than 2.6.3 or if you have the pref set.
Comment on attachment 242736 [details] [diff] [review] Include autocomplete.xpt in mail installer Neil tells me this is the right thing to do and seamonkey trunk packages both autocomplete xpt files.
Attachment #242736 - Flags: review?(mscott) → review+
Comment on attachment 242736 [details] [diff] [review] Include autocomplete.xpt in mail installer I think Neil is the right guy for sr=?, based on owners.html
Attachment #242736 - Flags: superreview?(neil)
Comment on attachment 242736 [details] [diff] [review] Include autocomplete.xpt in mail installer Actually this probably doesn't need sr but mscott should have told you if that was so.
Attachment #242736 - Flags: superreview?(neil) → superreview+
Whiteboard: [needs checkin]
Whiteboard: [needs checkin] → [checkin needed]
Blocks: 360648
Assignee: mscott → ptomli.bugzilla
mozilla/mail/installer/windows/packages-static 1.29 mozilla/mail/installer/removed-files.in 1.15
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → Thunderbird 3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: