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.
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.
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.
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.
|
||||||||
file.gotorc |
|
Sets the cursor position, in the current user interface, to match the specified row and columns.
|
||||||||
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).
|
||||||||
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.
|
||||||||
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)
|
||||||||
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
|
||||||||
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.