-
Notifications
You must be signed in to change notification settings - Fork 308
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
[question] How can I register native type into script? #441
Comments
The previous problem has been solved. But a new problem has arisen. The values of members in the native object cannot be changed in the script. What method can be used to solve this problem? native module code:
script code:
output: |
|
Following the above, "MyPos" is now a tengo object. |
I want to register my own object MyPos in go code, a struct like this.
golang code:
And provide a newMO() function to return this object. I hope that the members of this object can be accessed in the script, but I do not want to register this object in the script, for example:
script code:
Please tell me how to do this. Thx!
The text was updated successfully, but these errors were encountered: