remote form $construct method in design mode vs testing
Martin Obongita
martin.obongita at yahoo.com
Sun Sep 8 23:20:51 UTC 2024
Hi Philip,
That sounds like a great idea. I have tried to empty the forms in the panelsset. Now I receive an exception error message, " A subform set named "subformpanelset" already exists. when I run the destruct and reopen the form.
RegardsMartin.
On Monday, September 9, 2024 at 01:55:14 AM GMT+3, Philip Tulett <philip.tulett at pdq-networks.com> wrote:
Hi Martin,
A possible short cut for you would to instead of removing the subform set, to instead assign an empty form to replace the existing one and not destroying the subform set.
Kind regards Phil
Sent from my Galaxy
-------- Original message --------From: Philip Tulett <philip.tulett at pdq-networks.com> Date: 08/09/2024 23:52 (GMT+00:00) To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com> Cc: philip.tulett at pdq-networks.com, Martin Obongita <martin.obongita at yahoo.com> Subject: Re: remote form $construct method in design mode vs testing
Hi Martin,
The Subformset_remove removes and destroys the subformset, you will then need to use subformset_add to re add subforms. When you first add the subform, you are not actually adding a subform, you are just assigning form to the existing set...Check the online docs about this.
HTH
Kind regards Phil
Sent from my Galaxy
-------- Original message --------From: Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> Date: 08/09/2024 23:25 (GMT+00:00) To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com> Cc: Martin Obongita <martin.obongita at yahoo.com> Subject: Re: remote form $construct method in design mode vs testing
After furthers testing, I noticed that the $construct is being affected by a line of code in the $destruct
Do $cinst.$clientcommand("subformset_remove",row('SubformPanelsSet'))
Has anyone experienced issues with this code affecting the $construct? It could be an Omnis bug.
On Sunday, September 8, 2024 at 11:52:31 PM GMT+3, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
Hi everyone,
I'm experiencing a strange problem with the $construct of a remote form. I have created subform object in a secondary remote form. I have also created a primary form where I have buttons to select which subform to open in the secondary remote form. The $classname of the subform is assigned dynamically depending on the button clicked on the primary remote form. If I test the form for the first time, it runs okay and opens the subform. But fails a second test run. I therefore step through the code to catch where it is failing. The stack goes through the $event method of the button in the primary form, opens the secondary form but fails to step into the $construct of the secondary remote form. To assign the $classname property of the subform i run this code:
Do $cinst.$objs.SubFormHorzHeader.$classname.$assign(jsSFAddData)
Why would a stack step into a $construct of a js form in development mode but fail to call the same $construct on testing? Other remote forms work okay.
RegardsMartin.
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
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