Pyromaniac

Pyromaniac PRM: Twin

Pyromaniac PRM: Twin

RISC OS PyromaniacTwin

Introduction and Overview

The Twin module provides editing facilities for BBC BASIC, and for text files in general. Originally the Twin module was supplied with Arthur as a full screen editor. Under RISC OS Pyromaniac the modules provides access to configurable text editors.

RISC OS Pyromaniac7.03
Supported

Technical details

The Twin editor is traditionally involved by issuing the TWIN command from within BASIC. This command launches the Twin editor with the current BASIC program. When the Twin editor returns to BASIC, the program will be reloaded.

Under RISC OS Pyromaniac, the Twin module functions by invoking the configured Text Editor on the file, before returning to BASIC. By default, the text editor is configured to invoke the 'nano' editor, which is available for most POSIX based systems. The implementation to use may be set using the 'texteditor.implementation' configuration.

The text editor may be configured to use alternative implementations which have different presentations. One such alternative is the 'wxwidgets' implementation, which opens a new window to edit the text file.

In addition, the Twin module also provides the ability to start the editor on any file on disc with the command *Edit file. This command can also take the optional switch '-view', which makes the content read only.

The module may be disabled entirely with the 'twin.enable' setting, if its use might cause problems for the system.

*Commands

*Twin
Start the Twin editor with current BASIC program
*Twin @ start , end
<start>- Address in memory of the start of the text content to be edited, as a Hexadecimal number.
<end>- Address in memory of the end of the text content to be edited, as a Hexadecimal number.

This command is used to start the Twin editor on a block of memory. When finished, the content will be loaded into BASIC using a command like BASIC @8f00,9102.

*Twin @9008,a124
*Edit
Start the Twin editor with a specific file
*Edit -view filename
<filename>- Name of the RISC OS file which is to be edited in place, or viewed.
-view - Only view the text file. Makes the content read only and never saves back to the original file.

This command is used to start the Twin editor on a file. The command options allow the editor to be launched in read only mode.

RISC OS Pyromaniac7.34
Supported
*Edit $.MyApp.VersionNum