TestContext Data Member Function

Sets the UI state for a <Node> creation command. The current implementation tests if a <Group> node (or derived node type) is selected, or if the selection buffer is empty and prints a message using the StatusBar member of 'CommandInfo'. If a <Group> is selected or the selection buffer is empty, the message informs the user that the command will create a <Node> of type 'NodeType'. Otherwise, the message informs the user what type of selection is necessary for the command to be enabled.

Prototype

static int32 TestContext( CommandPresentationModuleInfo p_oCommandInfo, string p_sNodeTypeName )

Parameters

Parameter Type Parameter Name Documentation
<CommandPresentationModuleInfo>p_oCommandInfoA <CommandPresentationModuleInfo> object which is used to control parts of Scenome's user interface, including the relevant command user interface (toolbar button, menu item).
stringp_sNodeTypeNameA string value representing the name of the type of <Node> for which creation is being tested.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.