[EXTERNAL]Calling assigned subwindow method

Martin Obongita martin.obongita at yahoo.com
Tue Jan 3 17:37:29 UTC 2023


Brian, 
Thank you.
That was very helpful.
I had created many sub windows.
By referencing all the sub windows, 
I now notice an improvement in performance when opening windows.
I suspect (this is a huge assumption)
That Omnis takes longer to runDo $cinst.$objs
Compared toDo iObjRef





Sent from Yahoo Mail on Android 
 
  On Tue, 3 Jan 2023 at 17:53, Brian A O'Sullivan via omnisdev-en<omnisdev-en at lists.omnis-dev.com> wrote:   Hi Martin,
I use subwindows a lot in my desktop client apps. I presume this same approach should work for subforms.

In the subwindow field of the parent window, I define a $construct method which sets an instance-variable item-reference as a shortcut to the subwindow field:
        Set reference refSubWin to $cfield

This can then be used to address the instance of that subwindow. Elsewhere in the parent window we can then:

        Do refSubWin.$message(cMessage)

I really like using item references! They can greatly simplify & shorten notation strings.
Best regards,

Brian A. O'Sullivan
Delaware, USA


Sensitivity: Business Internal

-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Martin Obongita via omnisdev-en
Sent: Tuesday, January 3, 2023 8:04 AM
To: omnisdev-en at lists.omnis-dev.com
Cc: Martin Obongita <martin.obongita at yahoo.com>
Subject: [EXTERNAL]Calling assigned subwindow method

Hi All,
I call a method in a subwindow with the command in the main window:
Do $cinst.$objs.subform.$subinst().$message(cMessage)

How do I call a method in a subform IF I have assigned the classname of the subform?
For example:
Calculate lSubFormName as 'jsSubFormReport'
Do $cinst.$objs.SubForm.$classname.$assign(lSubFormName)
This instantiates the subform ok.
I tried running the line below from the main form and it fails:
Do $cinst.$objs.[lSubFormName].$subinst().$message(cMessage)


Kind regardsMartin Obongita
_____________________________________________________________
Manage your list subscriptions at https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.omnis-dev.com%2F&data=05%7C01%7C%7Ca19c4c14d47044515c8d08daed8b1a0f%7C8b4a07aecf3941d38e235c8d4c152da5%7C0%7C0%7C638083478944740099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xUiucDX4k5nraCFFJrtXaj6y03tZjtEO80r0eJNfeBE%3D&reserved=0
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com


This communication is for use by the intended recipient and contains information that may be Privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as "E-Contract Intended", this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. For more information regarding how we collect and use your personal data, and any related rights you may have, please review our Privacy Statement. <https://www.axalta.com/corporate/en_US/privacy.html>
_____________________________________________________________
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