michael at brainydata.co.uk
Sun Sep 25 11:40:56 UTC 2022
I could be wrong but I think the key is that these parameters are passed to the construct of the subform, that means $parameters has to be assigned prior to an instance existing, which means assigning $parameters when designing the subform, or programatically via class notation:
Once the instance is constructed, assigning $parameters will have no effect, i.e.
However, if you change the class of a subform at runtime, it may be that the following would still work:
That may be worth trying.
In any case, if I am right, perhaps the wording in the documentation may could do with further clarification.
Hope this makes sense
Brainy Data Limited
The Home for Omnis components
> On 22 Sep 2022, at 16:10, Das Goravani <goravanis at gmail.com> wrote:
> The docs have this paragraph:
> You can send parameters to the subform’s $construct() method by including a comma-separated list of parameter values in the $parameters property when you create the subform field. The $parameters property can only be assigned in the remote form editor, and it has no effect at runtime. If you attempt to set it at runtime in your code, the error "$parameters cannot be assigned at runtime" will be displayed on the client.
> Why would they have parameters that have no effect at runtime?
> When then are they good for?
> Does this mean something else?
> Will I find that the parameters property works at runtime?
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en