This repository was archived by the owner on Jan 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Add GDD Type invoke-action #11
Closed
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description of the "invoke" field should clarify if this is "the name of the function to invoke" or "an invocation of the function", i.e. - for a function called
myCustomHelloshould this bemyCustomHelloormyCustomHello("someArg0")? I was confused by what this is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
I've improved the description a tad now.
The
invokeproperty is supposed to contain the script being executed in the target template,myCustomHello("someArg0")There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jstarpl would you say this description is good enough?
https://github.com/SuperFlyTV/GraphicsDataDefinition/pull/11/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R386
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way the AMCP command CG INVOKE is documented, it does not allow to have arguments. Will that be changed?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the AMCP documentation definitely needs updating because AFAIK it this been supported for years. It's essentially executing any JS that it gets, not necessarily just invoking a function. You can do
CG 1-1 INVOKE 1 "var a = 1;a++;console.log(a)"and it'll work too, which might be a good or a bad thing, depending on where the invoked script comes fromThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, but what you explain is just kind of an inline function, that sits in place of the function name, like CG 1-1 INVOKE 1 "function_name". That is no contradiction to the documentation. What @nytamin and @jstarpl are talking about is having a function name and an argument, like we have for the CG UPDATE command. And that is undocumented and should, in my opinion be avoided.