Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for sceneSubBoundingRect and other functions requiring params, fix failing test on 12.5 #119

Merged
merged 3 commits into from
Nov 17, 2023

Conversation

triwav
Copy link
Owner

@triwav triwav commented Nov 17, 2023

No description provided.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…rams, fix failing test on 12.5
Copy link
Contributor

@TwitchBronBron TwitchBronBron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a few comments, but looks good!

if RTA_isNode(callOn) then
return callOn.getParent()
else
RTA_logWarn("tried to call getParent() on non node of type " + type(callOn))
end if
else if functionName = "count()" then
else if functionName = "count" then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like seeing all the paren optimizations here.

RTA_logWarn("tried to call sceneBoundingRect() on non node of type " + type(callOn))
RTA_logWarn("tried to call sceneBoundingRect on non node of type " + type(callOn))
end if
else if functionName = "sceneSubBoundingRect" then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way we could add better support for any function, rather than needing to hardcode specific functions? This list might become a bit unmanageable over time. Just curious.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that was one of the things Roku was asking us to rank. Currently there is no way to call a function from a param. I wouldn't be surprised if we never get it though as they use the fact that you have to use an exact string for a function call in their static analysis checks.

@triwav triwav merged commit 9d182bc into master Nov 17, 2023
@triwav triwav deleted the add_support_for_sceneSubBoundingRect branch November 17, 2023 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants