LoadFile Method (RICHEDITTEXT)


9.0B, PLBCMP GUI Only

 

The LoadFile method stores the contents of a file into a RICHEDITTEXT object. The method uses the following format:

 

 

[label]

{object}.LoadFile

[GIVING {return}] USING [*FileName=]{fname}[:

 

 

 

[*Options=]{options}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A RICHEDITTEXT object that is accessed.

return

Optional. A Numeric Variable that indicates the success or failure of the method.

fname

Required. A Character String Variable or literal that specifies the file name.

options

Optional. A decimal number or Numeric Variable that specifies the load options.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. If the value returned is zero, the ZERO Condition Flag is set.

  2. The OVER and EOS Condition Flags are always cleared.

  3. When running under the PL/B Application Server, the first character of the file name has special meaning:

  4.  

    Value

    The file ...

    ! (exclamation mark)

    resides on the client rather than the server.

    ? (question mark)

    should be either obtained from the cache or from the server and placed in the cache.

    * (asterisk)

    should be either obtained from the in-memory cache or from the server and placed only in the in-memory cache.

     

  5. The {options} value is a constant as defined in PLBMETH.INC or a numeric variable indicating one or more of the following option values:

  6.  

    Keyword

    Value

    Meaning ...

    $SF_TEXT

    0x1

    Load from a text file

    $SF_RTF

    0x2

    Load from a RTF file

    $SF_UNICODE

    0x10

    Input as Unicode file

    $SF_SELECTION

    0x800

    Replace only the selection

     

  7. A return value of zero (0) indicates success while a return value of non-zero an error.

 

 

See Also: Example Code, Method Syntax, RICHEDITTEXT Methods

 



PL/B Language Reference LineScroll Method Paste Method