nsIAutoCompleteSearch (et al) not defined

RESOLVED FIXED in Thunderbird 3

Status

RESOLVED FIXED
12 years ago
12 years ago

People

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

Tracking

Thunderbird 3
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
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.
(Assignee)

Comment 1

12 years ago
Created attachment 242736 [details] [diff] [review]
Include autocomplete.xpt in mail installer

I'm not sure if it's this simple

Updated

12 years ago
Attachment #242736 - Flags: review?(mscott)

Comment 2

12 years ago
Paul, what are you doing to see this error? I haven't actually seen the error mentioned in the report. 
(Assignee)

Comment 3

12 years ago
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.

Comment 4

12 years ago
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.

Comment 5

12 years ago
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 6

12 years ago
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+
(Assignee)

Comment 7

12 years ago
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 8

12 years ago
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+
(Assignee)

Updated

12 years ago
Whiteboard: [needs checkin]
Whiteboard: [needs checkin] → [checkin needed]
(Assignee)

Updated

12 years ago
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
Last Resolved: 12 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.