| Did you know ... | Search Documentation: |
| text_item->complete |
->insert_self.
This method is the central method of the text_item's completion
mechanism. This completion mechanism both deals selecting in
hierarchical organised data (like the Unix file-system) and with simple
lists of possible values. The second case is generally handled by text_item<->value_set.
For selecting from hierarchical organised data the following methods
need to be redefined:
<-split_completion
Split the currently typed value in a directory part and a
file part.<-completions
Return a set of possible files in the indicated
directory using the result of text_item<-split_completion.->indicate_directory
Indicate the match of a directory.
In this documentation we refer to files and directories,
but in general this may refer to any organised data using any
syntactical convention. The Prolog library file file_item.pl
illustrated how the methods described above may be redefined to select a
file from the Unix file-system.
When text_item->complete
is invoked, it attempts to complete the current entry. To do so, it
locates the first choice-point and the set of objects that may be
selected after this choice-point using chain<-complete_name.
If the current point is a choice-point it will pop-up the browser
object @completer with all possible completions. If the
current point is a unique description of a completed value it will
indicate such using the error sole_completion. Otherwise it will replace text_item<-displayed_value
with the text leading to the first choice-point or completion.
->indicate_directory -value_set