Handling native side (C/C++) nested structures in Wren #1222
Replies: 3 comments 1 reply
-
|
Hi,
Please provide an exemple code of what you are trying to do. The
description is vague enough to be hard to help you.
If you don't succeed, you are probably try to do too much in C/C++ trying
to handle the wren side. Making simple is hard, and wren callbacks must be
simple.
|
Beta Was this translation helpful? Give feedback.
-
|
What I would do in that case, is create view objects.
Each view would have a wren handle to the Package and a raw pointer to the
viewed structure.
In practice it looks like a shared pointer.
|
Beta Was this translation helpful? Give feedback.
-
|
Actually I don't know anything about view objects. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys,
I have just started to learn Wren, sorry in advance, for my dummy expectations if there is.
I am trying to access (set/get) some C++ classes which is nested (more than 3 levels), i.e. some classes includes other classes and all classes may have leaf nodes (basic types that can be set/get). Both (C/C++ and Wren) sides shall be auto generated during production, so I will just edit some templates. I cannot find a guide about nesting, is there an idiomatic way, Wrenish way to handle this problem?
I asked the problem to ChatGpt and Gemini, they took me to the open seas, showed me around for a while and left me on an island I didn't know :) . After 5 days of struggling, I determined that 50% of recommendations of these AI tools are definitely incorrect about the subject.
Thanks in advance, regards
Beta Was this translation helpful? Give feedback.
All reactions