Interface nsIAutoCompleteSimpleResultType

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.

Hierarchy

Properties

defaultIndex: number

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

errorDescription: string

A string describing the cause of a search failure

matchCount: number

The number of matches

searchResult: number

The result of the search

searchString: string

indicates success with matches and that the search is still ongoing The original search string

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Appends a match consisting of the given value, comment, image, style and the value to use for defaultIndex completion.

    Parameters

    • aValue: string

      The value to autocomplete to

    • aComment: string

      Comment shown in the autocomplete widget to describe this match

    • aImage: string

      Image shown in the autocomplete widget for this match.

    • aStyle: string

      Describes how to style the match in the autocomplete widget

    • aFinalCompleteValue: string

      Value used when the user confirms selecting this match. If not provided, aValue will be used.

    • aLabel: string

    Returns void

  • Get the final value that should be completed when the user confirms the match at the given index.

    Parameters

    • index: number

    Returns string

  • This returns the string that is displayed in the dropdown

    Parameters

    • index: number

    Returns string

  • Gets the listener for changes in the result.

    Returns nsIAutoCompleteSimpleResultListener

  • Get the style hint for the result at the given index

    Parameters

    • index: number

    Returns string

  • Inserts a match consisting of the given value, comment, image, style and the value to use for defaultIndex completion at a given position.

    Parameters

    • aIndex: number

      The index to insert at

    • aValue: string

      The value to autocomplete to

    • aComment: string

      Comment shown in the autocomplete widget to describe this match

    • aImage: string

      Image shown in the autocomplete widget for this match.

    • aStyle: string

      Describes how to style the match in the autocomplete widget

    • aFinalCompleteValue: string

      Value used when the user confirms selecting this match. If not provided, aValue will be used.

    • aLabel: string

    Returns void

  • Removes an existing match.

    Note

    this is different from removeValueAt, since it's not a consequence of a user action, and as such it won't notify onValueRemoved.

    Parameters

    • aIndex: number

    Returns void

  • Remove the value at the given index from the autocomplete results.

    Parameters

    • rowIndex: number

    Returns void

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

    Parameters

    • aDefaultIndex: number

    Returns void

  • A writer for the readonly attribute 'errorDescription'.

    Parameters

    • aErrorDescription: string

    Returns void

  • Sets a listener for changes in the result.

    Parameters

    • aListener: nsIAutoCompleteSimpleResultListener

    Returns void

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

    Parameters

    • aSearchResult: number

    Returns void

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

    Parameters

    • aSearchString: string

    Returns void

Generated using TypeDoc