pySelector

Parent: ygSelector Example Source code Header file

Description

A pySelector is an ygSelector that runs a Python script, similar to pyNode. In addition to the basic pyNode features, a pySelector's script can also call methods that correspond to the C++ ygSelector methods.

Messages

scriptstring [, string]load a Python script and create an object
reloadreload the script previously loaded by script
autoResetbooltell the node to automatically reset any time the script file is modified
callstringcall a function on the Python object

See pyInterface for details on what these messages do.

Events

pySelector itself does not generate any events. The Python scripts can generate their own events, however.

Keys

None.

Python Notes

pySelector uses the class pyInterface to define the basic Python ygNode functions. In addition, it defines a Python class ygSelector (derived from ygNode), which includes methods to interface with the C++ ygSelector methods.

The added functions in ygSelector are:

select (nodename)
Selects (makes active) the child node named nodename.
selectNum (i)
Selects (makes active) child node number i.
selected ( )
Returns the name of the currently selected child node.
selectedNum ( )
Returns the number of the currently selected child node.


Last updated 13 September 2002.
home page