Universal Robots TypeScript API - v10.12.0
    Preparing search index...

    Type Alias ProgramBehaviors<ProgramNodeSubtype>

    ProgramBehaviors describes the possible behaviors defined by program node. The object will be registered by calling registerProgramBehavior

    Type Parameters

    Index

    Properties

    allowedInContext?: ContextInsertionRule

    A function that determines if a node can be inserted at a given point in the tree. For example, the 'else' node can only be inserted if the 'if' node was it's previous sibling

    allowsChild?: ChildInsertionRule

    A function that determines if a node of a given type can be inserted as a child of the passed in node

    This factory is called to create a new node

    generateCodeAfterChildren?: CodeGenerator<ProgramNodeSubtype>

    The urscript to generate for your program node. Any urscript generated by this function will appear after the urscript generated for this node's children

    generateCodeBeforeChildren?: CodeGenerator<ProgramNodeSubtype>

    The urscript to generate for your program node. Any urscript generated by this function will appear before the urscript generated for this node's children

    generateCodePreamble?: CodeGenerator<ProgramNodeSubtype>

    The urscript to generate for your program node. This urscript will be generated after that of application nodes, but before the before start

    This function is called when an event in the ProgramNode's lifecycle occurs. For example, delete or paste. As an example, it could be used on paste to make sure any internal ids continue to be unique

    The function that is called to generate the program node label. This is what is displayed in the program tree when the node is not the selected node.

    This function is called to upgrade a node when the node data model has been changed. For example, if you have added a new mandatory field to your ProgramNode, this function should be used to give a default value to all existing nodes

    A function that validates the node. If the isValid return is false, the node will be marked in the invalid colour in the tree, and the program cannot be played