AW: assigning subwindow classname
Rudolf Bargholz
rudolf at bargholz.ch
Sat Sep 14 10:04:02 UTC 2024
Hi Martin,
When a window is opened, the subwindow parameters are passed from the parent window to the subwindow on construct. In the fat client version, you can clear the subwindow class name, then assign a new subwindow class name, in order to re-create an instance of the subwindow of a parent window. I do not think this is possible in the web window version. Thus, changing the parameters AFTER you have instanciated the subwindow makes little sense, as the reason for the $parameters has already been executed, and changing $parameters will not do anything.
Why do you not simply create a $init() method in your subwindow class, which you call from the parent window when you need to pass parameters/values from the parent window to the subwindow instance?
Do $cinst.$objs.subwindow.$init(Param1,Param2, ... )
You can also pass a value from the parent window to the subwindow in $parameters, passed as a field reference parameter, and then store the field reference oarameter in the $construct in an item reference instance variable in the subwindow. Thus, changing values in the parent window will change the value in the item reference variables in the subwindow.
Hope this makes sense.
Regards
Rudolf Bargholz
-----Ursprüngliche Nachricht-----
Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> Im Auftrag von Martin Obongita via omnisdev-en
Gesendet: Freitag, 13. September 2024 19:17
An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Cc: Martin Obongita <martin.obongita at yahoo.com>
Betreff: Re: assigning subwindow classname
This is a bit frustration.
I have this command in the window:
Do $cinst.$objs.subwindow.$parameters.$assign('Add Record')
If I test this, I get an error: Control subwindow: parameters cannot be assigned at runtime.
Any help please how parameter assignment to a subwindow works.
RegardsMartin.
On Friday, September 13, 2024 at 08:01:24 PM GMT+3, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
Hi all,
Please ignore this. I have seen in the documentation where to how to pass parameters in the properties of the subwindow object.
Martin.
On Friday, September 13, 2024 at 07:34:24 PM GMT+3, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
Hi all,
When assigning the classname property of a subwindow object in a remote form, is there a way to pass a parameter on to the remote form instance together with the classname?
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
_____________________________________________________________
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