Closed MicBe closed 7 years ago
Thanks for the positive feedback! 👍
In answer to your question, you could use a ClassVisitor to get more detailed information about the properties. This may be too generic?
Ponder, was formerly, CAMP, which exposed a name/getter/setter API, which is a form of reflection. I appreciate that you may want to go beyond that functionality. Currently type access is somewhat generic at the moment. This might be extended.
Is this question considered answered?
Yes, thank you!
First, congratulations, your library is great!
My goal is to use ponder to dynamically generate a user interface, based on the list of properties of a class. There is a part I seem to be missing though. How can I get precise information about the type of a property at runtime?
Here is what I want to do: I want to iterate over the properties of my class. For each one, depending on the type, I would render a specific widget in the UI.
Let's say I want to display the properties of this class:
The logic I would like to use would resemble be the following:
Is there a built-in mechanism in Ponder to do something like this?
Would it also be possible to attach other misc attributes to each property (booleans)? The reason is that I already have a very basic property system in which I store those attributes. If possible, I would put them at the same place where I declare property names and member pointers.
Have a great day, Michael