ctrl++ object transfer via dollar parameter
Posted: Tue Dec 04, 2018 3:43 pm
Is it possible to transfer ctrl++ object via dollar parameter to an other panel?
There is a mwe:
Library
Initialize panel-code:
Initialize oo-test-object.xml:
How can I transfer an object to a next reference?
With kind regards
Philipp
There is a mwe:
Library
Code: Select all
class AlertItem
{
protected string mName;
protected bool mState;
public AlertItem( string pName, bool pState )
{
mName = pName;
mState = pState;
}
public string getName()
{
return mName;
}
public bool getState()
{
return mState;
}
};
Code: Select all
main()
{
AlertItem ai1 = new AlertItem( "MyAlert", true );
addSymbol( myModuleName(), myPanelName(), "oo-test-object.xml", "MyRef", makeDynString( "$ai:" + ai1 ), 20, 20 );
}
Code: Select all
main()
{
AlertItem ai1 = $ai;
lblText.text = ai1.getName();
rect.backCol = ai1.getState() ? "blue" : "white";
}
With kind regards
Philipp