<<

Contents

Search

>>

 

EDITOR_LOAD_FILE

 

 

Function

 

 

Syntax:

EDITOR_LOAD_FILE(<Mask Field>,<File>[,<Handle>])

 

<Mask Field>

= <MASK FIELD>

<File>

= <STRING-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

 

 

Meaning:

EDITOR_LOAD_FILE loads the content of the file <File> into a Word Processor mask field.

 

The internal change flag of the Word Processor is reset.

 

<Handle> specifies the window that contains the word processor field. <Handle> can contain the window depth or the handle of a split window or a WINDOWCALL window. If the parameter <Handle> is missing, the word processor field must be on the current mask.

 

Attention: With 2T programs the file is loaded by the client. If the client cannot access the file, the file has to be copied first to the client with COPY_FILE_TO_CLIENT.

 

EDITOR_LOAD_FILE returns the following results:

Result

Meaning

0

Success

-1

<Mask Field> not found.

-2

<Mask Field> is not a Word Processor.

-3

Could not load <File>. ERRORTEXT$ contains the error message.

-4

<File> does not exist..

 

Attention: This function has no effect with Html programs.

 

Parameter:

Mask Field

Word Processor

File

Name of file

Handle

Window depth or handle of a split window or handle of a WINDOWCALL Window

 

Sample:

H% = EDITOR_LOAD_FILE(#5.#EDITOR$,"file:/c:/texte/Text.html")

IF H% <> 0
THEN ... Error ...
ENDIF

 

See also:

EDITOR_GET_CURSOR

EDITOR_GET_STYLEDTEXT$

EDITOR_GET_TEXT$

EDITOR_HAS_CHANGED

EDITOR_INSERT

EDITOR_LOAD_STRING

EDITOR_RESET_CHANGED

EDITOR_SET_COLOR

EDITOR_SET_CURSOR

EDITOR_SET_STYLE

GET_STYLEDTEXT_FROM_FILE$

EBUS_EDITOR_DEFAULT_EXTENSION$