Subform Parameters
Michael Monschau
michael at brainydata.co.uk
Sun Sep 25 11:40:56 UTC 2022
Hi Das,
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:
$clib.$remoteforms.myForm.$objs.mySubform.$parameters.$assign(…)
or
$clib.$windows.myWindow.$objs.mySubwindow.$parameters.$assign(…)
Once the instance is constructed, assigning $parameters will have no effect, i.e.
$cinst.$objs.mySubwindow.$parameters.$assign(…)
However, if you change the class of a subform at runtime, it may be that the following would still work:
Do $cinst.$objs.mySubwindow.$parameters.$assign(parameter)
Do $cinst.$objs.mySubwindow.$classname.$assign(“windowX”)
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
Michael
Brainy Data Limited
The Home for Omnis components
Web: www.brainydata.com
GitHub: https://github.com/BrainyData
> 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
mailing list