Class: Activity
Access to properties of the current activity is provided by the activity property of a stand, and using the this property within event handlers.
The variable provides access to properties and functions of the current activity (linked to a stand) that is currently processed. In addition, other activities of the (currently active) programme can be accessed with activity().
Note that in previous versions a global variable activity was provided by the C++ framework. This is no longer the case for consistency reasons. Please use the stand.activity or this variables instead.
See also: Variables stand (Stand)
// within an activity:
onEnter: function() {
console.log( this.name ); // access the activity with `this`
},
onExecute: function() {
fmengine.log('now running: ' + stand.activity.name); // access via the stand object
}