Open tommego opened 8 months ago
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.
Just like MatrixToFloatV function, it should return a foreign classe value named Float16,but there is no way to create Float16 foreign instance for Matrix's 0 slot.
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)
}
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
Can you elaborate. I don't understand what you mean
I‘am writing node editor with full wren codes, binding with raylib graphic engine.
I found new way to bind c++ foreign class to wren scripting env directly, I'll post new messages and questions for the future!
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