Wrap the whole thing in a TRY..CATCH and see what the exception object can tell 
you.

--

rk

-----Original Message-----
From: ProfoxTech <[email protected]> On Behalf Of Eric Selje
Sent: Tuesday, June 23, 2020 2:16 PM
To: [email protected]
Subject: Re: SetAll throws Variable Not Found

Maybe iterate through the objects rather than use SetAll and find the trouble 
child?

E


On Tue, Jun 23, 2020 at 12:01 PM Tracy Pearson <[email protected]>
wrote:

> Hello everyone,
>
> This code has worked for years, now sadly it is failing intermittently.
> It's
> in an internal application.
> I think the error is invalid or the line number and what method the 
> error occurs in is invalid.
>
> In a CommandGroup class, the INIT method calls the following 
> SetChildColor
> method:
>     * Set the forecolor property
>     THIS.SETALL("ForeColor", ;
>           EVALUATE( LEFT( RGBSCHEME(1,2), ;
>           AT(',', RGBSCHEME(1,2), 3) -1)+')'), "CommandButton")
>
>     THIS.SETALL("DisabledForeColor", ;
>           EVALUATE( LEFT( RGBSCHEME(1,10), ;
>           AT(",", RGBSCHEME(1,10), 3)-1)+")"), "CommandButton")
>
> Line four is throwing the error Variable is not found.
>
> To determine if it was odd timing related to the EVALUATE function we 
> changed the code to:
>     * Set the forecolor property
>     LOCAL enabledColor, disabledColor
>     enabledColor = EVALUATE( LEFT( RGBSCHEME(1,2), AT(',', 
> RGBSCHEME(1,2),
> 3) -1)+')')
>     disabledColor = EVALUATE( LEFT( RGBSCHEME(1,10),  AT(",", 
> RGBSCHEME(1,10), 3)-1)+")")
>
>     THIS.SETALL("ForeColor", enabledColor, "CommandButton")
>
>     THIS.SETALL("DisabledForeColor", disabledColor, "CommandButton")
>
> We now get the error on line 6.
>
> The stack shows the form is called, the commandgroup.init is running 
> and calls this method.
>
> I'm looking for some additional ideas to find this intermittent problem.
>
> Thank you,
> Tracy
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/mwhpr1001mb2144309617960e67e00ccc8dd2...@mwhpr1001mb2144.namprd10.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to