I've built an AutoCompleteSession as part of Quick File [1]
which uses the RDF mailnewsfoders datasource to allow
quick selection of folders.

At the moment the session is added to the autocomplete textbox
with addSession, but I'm interested in the possibility of
registering a new 'datasource' such that I could set the
session in the textbox searchSessions attribute.

Thus far I have found nothing of any real help to describe the
process of registering a new autocomplete session, like

@mozilla.org/autocompleteSession;1?type=history

where I expect mine would be something like

@mozilla.org/autocompleteSession;1?type=mailnewsfolders

I did find one doc [2], which talks abouot registering new RDF datasources.


Is the process similar?

And there is another question that I think I need to answer before
I know this is a possibility. I am displaying the nc:TreeFolderName
of the folders, seperated by /'s, but the app actually needs the
URI of the folder selected. I've done this in the current implementation
by re-searching at the onAutoComplete stage, since there seems to be
no name->value type system available.

If I was using a registered autocomplete session, is it possible to
get back something other than the text the user is typing/seeing
in the textbox?

'Local Folders/My Mail/Foo' -> 'local://[EMAIL PROTECTED]/My Mail/Foo'

(or similar, I don't remember the exact URI)

Cheers,

Paul


[1] http://www.paultomlin.com/projects/mozilla/thunderbird/quickfile/
[2] http://docs.mandragor.org/files/Misc/Mozilla_applications_en/mozilla-chp-10-sect-3.html
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to