Subroutines > Detailed Descriptions > XTREE > XTREE Parameters
file

This specifies a sequential file to be used for input instead of the array parameter. When non-null, the interpretation of array, addcnt, and answer parameters changes as follows.

If neither the multiple selection (XTF_MSEL) nor XTF_FILANS flags are set, then array becomes an ordinary string, which is used to pass in the default selection (text) and to get back the item chosen by the user and answer is ignored.

If XTF_MSEL is not set but XTF_FILANS is set, then array is still treated as an ordinary string which returns the text of the item chosen, but answer is used exactly as in array mode (to return the row number of the selected item, and to pass in the default row number).

If the multiple selection flag (XTF_MSEL) is set, then array is ignored and answer is treated as an array of one byte selection flags, exactly as for multiple-selection array mode. addcnt should be set to 0 to load the entire file, or else set to the number of records (lines) to be loaded.

The default selection process (in single-selection mode) works only on the first column. If the cells in the first column are not all unique, then you may not end up with the desired item selected. The only workaround is to add a first column that is unique, or to switch to the array mode, which identifies selections by the array index. Also note that XTREE supports the PCKLST “hidden text” feature, which allows you to pass hidden text in the last column of the data by preceding it with a \. Although this technique is useful for associating control information with list items without having to display it, a better way to do this with XTREE is to just define a hidden column. The \hidden text feature is preserved just for compatibility with PCKLST.