-
Hi everyone! I created a widget that visualize a struct export struct CompModel{
type: string,
compId: int,
enabled: bool,
state: MachineState,
availableInRepo:bool,
modelConnected: bool
} In my application, I have a number of in property <[CompModel]> models In my c++ code I create a But I need to modify - let's say - the Help highly appreciated. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It's bindings all the way down:-) If you change a If you delete/recreate an entire I am using models of models in |
Beta Was this translation helpful? Give feedback.
-
I thought this is a common usage of the framework. Could anyone give me a hint? |
Beta Was this translation helpful? Give feedback.
As you have noticed, generated
CompModel
structure has only fields with the directly used types, so changingenabled
for example implies no way of finding out that it changed. The barrier of notification here is not the structure but the model, or specifically the model'srow
the particularCompModel
is in.If the entire row or just an individual field of the struct changes, the model needs know that the row changed, in order to notify the UI (or view in MVC terms) that it may (or may not) need updating.
If you'r using
VectorModel
, the pattern would be like this:The last call will notify …