Forum

Issue with changing data with channels in models

I tried to isolate the problem and illustrate how it works
the model changes, but the changes are not bidirectional and are not passed to the interface
moreover, i don’t know exactly how yet, but the data changed in this way are “erased” by the interface after some time


channel_issue.vl (45.2 KB)

but it works it this way

Weird one.
Appears to be a VL.ImGui issue. Will have a look when back to that.

This works:
SelectByPath.vl (12.1 KB)

So probably no Channel issue. Will keep you posted.
Thanks!

1 Like

It works if Settings is a Record:
channel_bypath_record.vl (48.8 KB)

If Settings is a class the path will result in changing the Settings instance, but it won’t create a new instance. It will just write the property “path” inside the existing Settings instance.
Since it’s not a new instance it doesn’t get pushed by the master channel.

If record isn’t an option for you, here is another solution to make sure that the master channel gets pushed to:
channel_bypath_class_force.vl (50.0 KB)

1 Like

Thanks a lot! It’s actually very interesting!
btw feel free to include this patch as example as is or modified

1 Like

This got easier with newest preview. You don’t need to Force anymore. Select (ByPath) will now always push to master channel.

1 Like

@gregsn Does this mean that classes can now be used in a similar scenario to the one shown above?

Yes. Both records and classes should work.

1 Like