Basic |
Property | Description |
---|---|
BaseName | The macro's base name is like a current directory. If the FileName is a relative path, then it's relative to the BaseName. |
FileName | Adjust the file name if its a relative path. |
Macro names that begin with a '*' can be mapped from relative names to absolute names using the BaseName. Implement this event if you are going to store macros/modules somewhere besides the file system.
BaseName, is the name of macro/module that provides the base context for establishing an absolute path from a relative path. The BaseName may or may not begin with a '*'. FileName, is the macro/module name to be mapped. Return the fully mapped name by changing the FileName parameter.
The resulting FileName must be mapped to a canonical form. This means that different relative paths to the same "file" must return in FileName the same "absolute" path. If the resulting FileName does not begin with '*', the ReadMacro event will not be fired.
This event is not made if the BaseName starts with '*' and the FileName does not. Turn on the MapMacroNameBase feature if you want this event to occur in that case, too.
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. |
private void basicIdeCtl1_MapMacroName(object sender, MapMacroNameEventArgs e) { if (e.BaseName.Substring(0, 2) == "*\\" && e.FileName.SubString(0, 2) != "*\\") \\ resolve relative name as an absolute name e.FileName = "*" & Path.GetDirectoryName(e.BaseName) & "\\" & e.FileName.Substring(1); }