Highlighted

Is variableName parameter optional for CPAPI_VARIABLEVALUECHANGED event listener?

Engaged ,
Jan 28, 2019

Copy link to clipboard

Copied

Hi there,

Trying to get my head around subscribing to the event listeners coming with cpAPIInterface. I am able to subscribe to CPAPI_VARIABLEVALUECHANGED event listener, specifying the variable that I want to monitor through a parameter; e.g.:

eventEmitterObj.addEventListener( 'CPAPI_VARIABLEVALUECHANGED', myfunction, 'cpInfoCurrentFrame' )

However, Adobe's documentation here says that providing that parameter would actually be optional:

optional.PNG

From that I understand that it should be possible to omit it and have the event listener listening to all variables at the same time, firing whenever one of them experiences a change of value. Can't get it to work though. Does it just read 'optional' because it's not required for all other event listeners in the cpAPIEventEmitter Object, but is still required for the CPAPI_VARIABLEVALUECHANGED event listener?

Views

147

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Is variableName parameter optional for CPAPI_VARIABLEVALUECHANGED event listener?

Engaged ,
Jan 28, 2019

Copy link to clipboard

Copied

Hi there,

Trying to get my head around subscribing to the event listeners coming with cpAPIInterface. I am able to subscribe to CPAPI_VARIABLEVALUECHANGED event listener, specifying the variable that I want to monitor through a parameter; e.g.:

eventEmitterObj.addEventListener( 'CPAPI_VARIABLEVALUECHANGED', myfunction, 'cpInfoCurrentFrame' )

However, Adobe's documentation here says that providing that parameter would actually be optional:

optional.PNG

From that I understand that it should be possible to omit it and have the event listener listening to all variables at the same time, firing whenever one of them experiences a change of value. Can't get it to work though. Does it just read 'optional' because it's not required for all other event listeners in the cpAPIEventEmitter Object, but is still required for the CPAPI_VARIABLEVALUECHANGED event listener?

Views

148

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Have something to add?

Join the conversation
Resources
Captivate User Guide
New Group