Root container custom properties are not reset

Custom properties (also used for window parameters passed to system.nav.openWindow) added to the root container are not reset to their default value when a window is opened. This results in the following undesirable behaviour:

  1. An unbound property will not update in the client if the value is changed in the designer.
  2. Optional arguments do not work as expected for system.nav.openWindow(). Any property not passed in the parameters dictionary will not reset to its default/unbound value.

Note that this undesirable behaviour persists for an entire client session. Even if the window is closed, when it is reopened any parameters not explicitly set will continue with whatever value they had before.

Is there some way that this can be fixed?

Thanks.

I just posted an explanation of why this is on this post. I know you probably understand much of this already, but this behavior is necessary for the parameter passing system. Our system doesn’t know which root container properties are “intended” as parameters and which are intended as something else. What you should do to protect against any unintentional property value holdover is not use root container properties for anything but window parameters.

Good explanation, should help clear up some confusion.

It could be fixed by separating out window parameters from root container properties and using these when the window is reloaded, but I can see that this would likely cause even more confusion and would break other things.

This just highlights the need for application-specific abstractions.

Thanks again Carl.

Yeah. If we’d done it like that from the get-go it would have been great, but patching that on after the fact probably would do more harm than good.