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 POLO objects to registry? eq. hs.geometry #3660

Open
muescha opened this issue Aug 7, 2024 · 0 comments
Open

add POLO objects to registry? eq. hs.geometry #3660

muescha opened this issue Aug 7, 2024 · 0 comments

Comments

@muescha
Copy link
Contributor

muescha commented Aug 7, 2024

          FWIW, lua only code can add its metatable to the registry so `hs.getObjectMetatable` works with the following code:
debug.getregistry()[userdata_tag] = metatable

Then, hs.getObjectMetatable(userdata_tag) will work; it also means that we can assign the metatable from C/Swift side code, even though the metatable is pure lua code.

Originally posted by @asmagill in #3541 (comment)

so shout I open an PR Request to add this to the hs.geometry file?

debug.getregistry()['hs.geometry`] = geometry

PS: and if there are other objects without a registry also to them?

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

No branches or pull requests

1 participant