The ShowList Object

The ShowList object is used to indicte that a list of expressions returned by a command should be shown in the autocomplete popup.

The ShowList object is defined to be a two parameter object. The expression in the first parameter will be substituted for the highlighted term (it can be the same as the highlighted term) and the expression in the second parameter will typically be a list of results that are displayed in the autocomplete popup.

In most cases, the ToShowList function is used to create an instance of the ShowList object. If there is only one item in the list of options, the ToShowList function will just return that single item rather than constructing a ShowList object. This avoids having the autocomplete popup appear when there is only one item in the list of results.

An example of the use of the ShowList object is the Equivalence command. Typically, when a command is expected to generate a list of results, the command function will have a clause like:

which includes a call to a second function (in this case, the Equivalence function) that actually generates the list. This function typically will have the BuildAll property so that all of the clauses in the function are executed and the results are returned inside a List object.