Wrap the whole thing in a TRY..CATCH and see what the exception object can tell you.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Eric Selje Sent: Tuesday, June 23, 2020 2:16 PM To: profoxtech@leafe.com 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 tracy@powerchurch.com 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]