Call methods to closed window
Reg Paling
reg.paling at lokanet.com
Wed Mar 22 10:30:16 UTC 2023
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
>
More information about the omnisdev-en
mailing list