Skip to content

Add computed attributes / properties to userdata objects? #1381

Answered by vegorov-rbx
natinusala asked this question in Q&A
Discussion options

You must be logged in to vote

__index and __newindex can be functions, so you can make the redirection to function calls there.

As a base, I would recommend looking at https://www.lua.org/pil/13.4.4.html and building upon that.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@natinusala
Comment options

Answer selected by natinusala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants