Built-in functions: EwIsSecondaryObject()

The function EwIsSecondaryObject() verifies whether an object is the primary object within the actual prototyping session or an object embedded within the primary object.

Declaration

bool EwIsSecondaryObject( object aObject )

Parameters

aObject

Object to test.

Discussion

The function EwIsSecondaryObject() verifies whether the object passed in the parameter aObject does represent the component you are currently editing in Composer or testing in Prototyper window or it is an object embedded directly inside it. This function is available in the prototyping environment of Embedded Wizard only. Therefore you should enclose it always between a pair of $if .. $endif compiler directives to avoid Chora errors when generating code for the target system.

This function is useful if you need to perform operations during editing or prototyping of a component only. For example:

$if $composer // Is 'this' object the instance of the actually edited component or // an object embedded inside it? if ( EwIsSecondaryObject( this )) trace "Yes"; $endif $if $prototyper // Is 'this' object the instance of the component started in Prototyper // or an object embedded inside it? if ( EwIsSecondaryObject( this )) trace "Yes"; $endif

See also EwIsPrimaryObject().