dagGetCurrentObject
dagGetCurrentObject() =>w_object/nil
Description
Identifies the node for which the action was selected. It takes no arguments and returns the current node, or nil.
This function is intended for use in the action functions and in display list SKILL objects. The current object is set by the dag routines under the following conditions:
- When each dagnode is drawn, that node is made current.
- When the user invokes an action routine of a node, that node is made current.
-
When the currently active node is deleted, in which case
dagGetCurrentObjectwill returnnil.
dagGetCurrentObject returns the object where the pointer is located at the time the function executes. If you start a long procedure and then move the pointer to another object before dagGetCurrentObject executes, dagGetCurrentObject returns the new object, not the original one.
If you call other procedures from your action callback, you should call dagGetCurrentObject in the first procedure only, and then pass a variable to the subprocedures. Do not call dagGetCurrentObject multiple times in a callback tree.
Arguments
Value Returned
Examples
procedure( myDagCallback( )
prog( (curObject)
curObject = dagGetCurrentObject( )
subProc( curObject )
)
)
procedure( subProc( curObject )
; whatever
)
Related Topics
Return to top