Current Page:
NeXtMidas Training
Primitives
Real Time Controls
gets and sets
|
|
- Real-time controls:
- Real-time controls are implemented through the
get and set
methods in a primitive.
- The
get and set methods follow the JavaBeans standard:
getName() |
Gets the value of Name . |
isName() |
Alternative to getName()
used when Name is a boolean. |
setName(val) |
Sets the value of Name to val . |
- Any
get and set methods (that are public ) are
automatically accessible from a macro. Example:
set reg.myprim.name 42
- To make a value read-only, simply omit the
set method. (In general,
there should never be any write-only values.)
- Warning: All primitives come with special
get and
set methods. Please check the documentation for Primitive
to make sure you don't accidentally override one of these.
X-Midas Users Take Note: |
X-Midas primitives use control widgets that must be manually initialized and checked.
This is not the case in NeXtMidas which automatically makes a "real-time control" out
of any get or set method in the primitive.
|
|
|
|