Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Significantly revised from 8.2.
8.2 version

load-file

Arguments: text-edit-pane &optional pathname delay-redraw

Loads text from a text file into a multi-line text-editing window.

text-edit-pane should be the text-edit-pane to load the text into. Alternately it can be a text-edit-window, in which case the text will be loaded into the frame-child of the window. It may also be the window of a multi-line-editable-text widget.

pathname should be a pathname or path namestring of a text file, or else nil. If nil, the usual file-selection dialog is shown to let the user interactively select the file to load.

delay-redraw is used internally and is probably not useful in applications. It prevents the text-edit-pane from redrawing itself automatically to reveal the loaded text.

On the Windows platform, this function will attempt to determine if the file is in a 16-bit Unicode format (either little- or big-endian) or UTF8, and will read the text using that external format if so. Otherwise it will read the file using using the external format of the locale with which the Windows operating system is currently booted, on the assumption that it matches. The function external-format-for-save will return the format that load-file used, and calling save-file later on the text-edit-pane will write the file back in the same format (except for cases documented under external-format-for-saved-files and external-format-for-save).

See the configuration option load-utf8-if-no-bom which controls behavior when loading a text file with no byte order marker (BOM) bytes at the beginning.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page has had significant revisions compared to the 8.2 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Significantly revised from 8.2.
8.2 version