WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIAutoCompleteResult

IID:d2fcba9a-3f5c-40fc-a9fc-4adc87dc61ef
Inherits From:nsISupports

This interface is implemented by the following components:


Constants

Possible values for the searchResult attribute
PRUint16 RESULT_IGNORED = 1
PRUint16 RESULT_FAILURE = 2
PRUint16 RESULT_NOMATCH = 3
PRUint16 RESULT_SUCCESS = 4
PRUint16 RESULT_NOMATCH_ONGOING = 5
PRUint16 RESULT_SUCCESS_ONGOING = 6

Properties

readonly PRInt32 defaultIndex

Index of the default item that should be entered if none is selected

readonly AString errorDescription

A string describing the cause of a search failure

readonly PRUint32 matchCount

The number of matches

readonly PRUint16 searchResult

The result of the search

readonly AString searchString

The original search string


Methods

AString getCommentAt ( PRInt32 index ) AString getImageAt ( PRInt32 index ) AString getStyleAt ( PRInt32 index ) AString getValueAt ( PRInt32 index ) void removeValueAt ( PRInt32 rowIndex , PRBool removeFromDb )

AString getCommentAt ( PRInt32 index )

Get the comment of the result at the given index

Arguments:
index

AString getImageAt ( PRInt32 index )

Get the image of the result at the given index

Arguments:
index

AString getStyleAt ( PRInt32 index )

Get the style hint for the result at the given index

Arguments:
index

AString getValueAt ( PRInt32 index )

Get the value of the result at the given index

Arguments:
index

void removeValueAt ( PRInt32 rowIndex , PRBool removeFromDb )

Remove the value at the given index from the autocomplete results. If removeFromDb is set to true, the value should be removed from persistent storage as well.

Arguments:
rowIndex
removeFromDb

References

This interface is passed as an argument to the following methods:

nsIAutoCompleteObserver.onSearchResult, nsIAutoCompleteSearch.startSearch, nsILoginManager.autoCompleteSearch

This interface is returned from the following methods:

nsILoginManager.autoCompleteSearch

Reference documentation is generated from Mozilla's source.