Extern(name, File(fileName), triggeredBy(msg1, msg2, ..., msgn))
Extern(name, triggeredBy(msg1, msg2, ..., msgn),
File(fileName))
| Parameter | Description |
|---|---|
| name | module name |
| fName | name of the file to be reloaded |
| msg1 | message causes reloading |
| . . . | . . . |
| msgn | message causes reloading |
Extern declares a module, with a complete
definition that contains another file. It should only be loaded, if one of the
listed messages had been sent. The message certainly arrives at the reloaded
module (see Example).
If the module to be reloaded has been derived from another module, there are two
options:
The inheritance relation is described via statement Extern, so InstantView® can reload the required base modules automatically.
The extern statement for the last case:
Extern(name, File(fileName1,
triggeredBy(msg1, msg2, ..., msgn)) : baseModName
Extern(baseModName, File(fileName2))
No lists of causing messages is specified for a base module! There is no specific order. In contradiction the module definition, the external declaration of a base module can also appear for the derived modules after the Extern statement.
Base module specification in the Extern statement has priority before specifying the base module for statement Module (in the module source code). With this, it is possible to modify the derivation sequence via Extern statement.
External declarations are an important tool to create applications based on prefabricated AppsWarehouse® modules.
To simply describe a new module combination by entering another file, it makes sense to redefine Extern statements, that have already been read by the InstantView® interpreter, differently. Therefore, it is possible to indicate the name of the module to be overwritten, in another - optional - parameter.
Extern(name, ... overwrites(moduleName), ...)
"Overwriting" can be understood from the perspective of the triggering messages - the action list, defined by the triggeredBy clause to load the module, is being removed:
Message ALFA will now load (only) module B, the Extern statement for A has no effect.
This makes combining larger applications easier (see Example). The module, specified in the overwrites clause must not be loaded, yet.
Multiple Extern statements are allowed for the same module. The triggering messages are collected (see Example).