TEXTFILE

[CLASS]


OM 6.1
Function Reference
SLOTS:

- SELF :object
- EXP-LIST :input data or text
- ED-MODE :append or supersede
- EVAL-MODE :eval interpretation mode

Description:

TextFile represents a text buffer in a visual program. It can be used to enter or collect data and is editable in a text window.

- <self> represents/returns the TextFile object. The input can be connected to a pathname to attach and fill the TextFile buffer with a file on the disk.
(Note: use the contextual menu in order to change the TextFile attachement settings.)

- <exp-list> represents the data in the TextFile.
As input it can be a single item (string or value) or a list, and then each item is considered as a new line in the text buffer.
As output it returns the contents of the text buffer as a list formatted according to <eval-mode>

- <ed-mode> determines how additional data is filled into the text buffer when the box is evaluated. "append" means that the new data is added at the end of the buffer without deleting its contents. "supersede" means that the current contents is removed and replaced by the new values.

- <eval-mode> determines how <exp-list> is formatted at evaluation. The available options are 'text' : each line is interpreted as a string; 'data list' : each line is collected in a list; 'lis' : ignores line breaks and returns a flat list.