Please enable JavaScript to view this site.

These methods provide a general interface for managing editor-type objects in the RDE workspace.

Method

Result

Description / parameters

file.filename

String

Query current file name

file.create

Boolean

Open editor user interface and create in memory the specified file.

filename

Full name from the file to be created

language

Language ID (opz, for internal ascii editor color syntax)

connection

Name of the connection to use (opz)

Returns logical result of operation.

file.open

Boolean

Open editor user interface and load from disk the specified file: if the operation fails, the corresponding error message is displayed, then the created file new in memory.

filename

Full name of the file to be loaded

language

Language ID (opz, for internal ascii editor color syntax)

connection

Name of the connection to use (opz)

Returns logical result of operation.

file.close

Boolean

Changes to the file in memory are lost and the UI is closed (in most cases, this method corresponds to ui .close).

Returns logical operation outcome.

file.save

Boolean

Save in-memory changes to the file to disk. Returns logical operation outcome.

file.saveas

Boolean

Saving changes in memory to the file on disk: if the operation succeeds, the editor changes the name of the current file to the one specified.

filename

Proposed full name of the file sa save (opz).

Returns logical outcome of operation.

file.commit

Boolean

Save to disk changes in memory to the file, only if present.

Returns logical operation outcome.

file.revert

Boolean

Reloads the contents of the file from disk, losing any changes in memory.

Return logical outcome of operation.

file.gotoline

 

Sets the cursor position, in the current user interface, to match the specified line no.

line

Required line no.

file.gotorc

 

Sets the cursor position, in the current user interface, to match the specified row and columns.

row

Required row no.

col

No. of column required

file.gototag

Boolean (#2)

Sets the cursor position, in the current UI, to match the specified tag (the content/syntax of the tag depends on each specific UI).

tag

Required tag

file.is_ascii (#1)

 

Queries whether editor for ascii (text) type files. -- DEPRECATED.

file.is_binary (#1)

 

Queries if editor for binary type files. -- DEPRECATED

file.isascii (#1)

 

Queries whether editor for ascii (textual) type files.

file.isbinary (#1)

 

Queries whether editor for binary type files.

file.getbmlist

String

Queries list of editor UI bookmarks (see method file.setbmlist).

file.setbmlist

 

Set new editor UI bookmarks list.

list

List of bookmarks, in the format <S1>[SEP<S2>[SEP...]], where SEP is the 254 ascii separator character, and Sx has the format <name>#<line>, where:

- name is the type of bookmark, where G is generic while (0-9) is a bookmark with that name;

- line is the line number to which it is defined;

- # is a separator character.

file.filterlist

String list

Query list base file filters, handled by the object type

file.filtersuffix

String

Query suffix corresponding to the specified filter (valid for both basic and extra filters)

filter

Source filter

file.suffixlist

String list

Query list of base file suffixes, handled by object type

file.extrafilterlist

String list

Query list extra file filters, provided by object type

file.extrasuffixlist

String list

Query list of extra file suffixes, provided by the object type

file.setsel

 

Sets selection

row0

Starting row no.

col0

Starting column no.

row1

No. of arrival row (greater than/equal to row0)

col1

No. of arrival column (greater than/equal to col0)

file.print

Boolean

Print the contents of the file.

Returns logical result of operation.

(#1) These methods are used to check object characteristics and are not invokable.

(#2) Boolean return type introduced by RDE v3.55.1-11: previously it was none.

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC