Call methods to closed window

kim at martel.com.au kim at martel.com.au
Wed Mar 22 11:09:29 UTC 2023


Thank you Reg & Kelly

I just added $cando as suggested by Reg

   Do iCallBack.$setAttachments.$cando() Returns #F

And if window closed it ignores line and continues
Regards
Kim



-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Reg Paling
Sent: Wednesday, 22 March 2023 9:30 PM
To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Subject: Re: Call methods to closed window

Hi Kim,

You could try   If  iCallBack.$setAttachments.$cando()   which may or may
not work in that context, i guess.

Kind regards,
Reg

On Wed, Mar 22, 2023 at 8:30 PM <kim at martel.com.au> wrote:

> In OS10.2 I have a problem when I try to call back a method (item
> reference)
> in a window that has closed it causes code to stop and in run time 
> closes all windows with error
>
>
>
> Do iCallBack.$setAttachments() Returns #F
>
> Close window instance [$cwind().$name]
>
>
>
> Where iCallBack is item reference to window instance.
>
>
>
> Normally window is open so no problem.  If window is closed accidently 
> the active window cannot call method the method before it closes.
>
>
>
> I can avoid this by testing if window instance is still open before 
> calling the method.
>
>
>
> Can you calculate a character from an item reference so you can then 
> calculate the iwindow name.
>
>
>
> iCallBack = Reference to $root.$iwindows.wExam_633
>
>
>
> If I can calculate a character as wExam_633 I could test to see if 
> Window is open before calling method to prevent the error
>
>
>
> OR is there another better way
>
>
>
> Regards
>
> Kim Martel
>
>
>
>
>
>
>
> --
> This email has been checked for viruses by AVG antivirus software.
> www.avg.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 


-- 
This email has been checked for viruses by AVG antivirus software.
www.avg.com


More information about the omnisdev-en mailing list