-
Notifications
You must be signed in to change notification settings - Fork 555
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
How to return other foreign class obj from a foreign class ? #1182
Comments
I Known I can use Handle to store on setter implement, and return handle to getter implement, but some times those foreign objects are initialized on c/c++code, and without setting property action, and that time it will return null value. |
You need an intermediate function to create a Color instance, so you can
initialize it with the real value:
foreign class Object {
color { color_(Color.new()) }
foreign color_(color)
}
|
Thanks for your answer, this way work well for getter/setter! |
I actually need to implement my first post function at all..., but there is no way to create other foreign class object to slot 0 for my return value. |
Can you elaborate. I don't understand what you mean
|
I'm Writing small game engine with wren binding support(love wren language very mutch, binding raylib to wren...)
My wren.inc codes:
My cpp codes:(for getter/setter)
I had implement Json.hpp Bingding for wren Map value, my codes post to this issue.
Json.hpp binding to wren Map codes & test
The text was updated successfully, but these errors were encountered: