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.

nsIAutoCompleteSimpleResult

IID:f9841787-ad26-49e6-a2dd-ba9020ee1c64
Inherits From:nsIAutoCompleteResult

This class implements nsIAutoCompleteResult and provides simple methods for setting the value and result items. It can be used whenever some basic auto complete results are needed that can be pre-generated and filled into an array.

This interface is implemented by the following components:


Methods

void appendMatch ( AString value , AString comment , AString image , AString style ) void setDefaultIndex ( PRInt32 defaultIndex ) void setErrorDescription ( AString errorDescription ) void setListener ( nsIAutoCompleteSimpleResultListener listener ) void setSearchResult ( PRUint16 searchResult ) void setSearchString ( AString searchString )

void appendMatch ( AString value , AString comment , AString image , AString style )

Appends a result item consisting of the given value, comment, image and style. This is how you add results. Note: image and style are optional.

Arguments:
value
comment
image
style

void setDefaultIndex ( PRInt32 defaultIndex )

A writer for the readonly attribute 'defaultIndex' which should contain the index of the list that will be selected by default (normally 0).

Arguments:
defaultIndex

void setErrorDescription ( AString errorDescription )

A writer for the readonly attribute 'errorDescription'.

Arguments:
errorDescription

void setListener ( nsIAutoCompleteSimpleResultListener listener )

Sets a listener for changes in the result.

Arguments:
listener

void setSearchResult ( PRUint16 searchResult )

A writer for the readonly attribute 'searchResult' which should contain one of the constants nsIAutoCompleteResult.RESULT_* indicating the success of the search.

Arguments:
searchResult

void setSearchString ( AString searchString )

A writer for the readonly attribute 'searchString' which should contain the string that the user typed.

Arguments:
searchString

References

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

nsIAutoCompleteSimpleResultListener.onValueRemoved

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com