zxt:extension:00000000:0001
This is an old revision of the document!
Table of Contents
00000000:0001 - #IFEXT
Information
- ID: 00000000:0001
Flags
Flag | Set? (MUST/MAY/…) | Description |
---|---|---|
parsing_must | MUST NOT | |
reading_must | MUST NOT | |
writing_must | MUST NOT | |
playing_should | MAY | If any #IFEXT calls are used in Objects with the described caveat for optional support. |
playing_must | MAY | If any #IFEXT calls are used in Objects. |
editing_should | MUST NOT |
Field data
None.
Description
This extension adds an OOP command which faciliates run-time detection of extensions on both ZZT 3.2 and ZXT-compatible implementations. The command is #IFEXT owner_id selector_id …
, where owner_id and selector_id are specified as 32-bit and 16-bit hexadecimal numbers, respectively. If the extension with a given owner_id and selector_id is currently active within the execution context, the rest of the line is treated as a command.
Keep in mind that to support #IFEXT
as an optional extension, an :IFEXT
label SHOULD be provided to handle the situation in which this extension is not present.
Example usage
Simple scenario
#ifext 00000000 0001 found :found Extensions found! #end :ifext Extensions not found. #end
Two touch codepaths
@Interactive #ifext 00000000 0001 zap touch #end :touch I found nothing... #end :touch I found IFEXT support! #end
Implementations
zxt/extension/00000000/0001.1628288466.txt.gz · Last modified: 2021/08/06 22:21 by asie