Basic |
Property | Description |
---|---|
FileName | The file name. FileName, is the name of the macro/module that needs to be read. Its first character will always be '*'. |
Code | The code. Code, is where the macro/module's text is returned. |
Changed | Set to true if the code has been changed. |
Cancel | Set to false to NOT cancel reading the macro. |
Implement this event if you are going to store macros/modules somewhere besides the file system.
Macro/Module Paths
Macro/module paths are typically file paths. However, it is sometimes useful to work with macros/modules that are not stored as files. A macro/module path is of the form:
[*[*]]path[*]
Part | Description |
---|---|
'*' | Paths that being with '*' are non-file system macro/modules. The application provides the methods for reading and writing these files. Paths that begin and end with '*' are hidden from the IDE. User's can't step into or otherwise inspect the contents. |
'**' | Paths that begin with '**' are non-file system modules. The application provides the methods for reading and writing these files. Running an event-driven module loads it using LoadModule. |
path | This is the identity of the macro/module. |
The ReadMacro event can return an error by setting the Code to "%ERR%=text", where text describes the error. Alternatively, the text can be a C style hex constant (i.e. 0x2) in which case the Windows FormatMessage API will used to determined the error text. The error text will be shown by the file open error dialog of the IDE.