Excellent catch; thanks.

> On Apr 20, 2017, at 12:34 PM, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Not only do you probably do not need execute you could write in one line of 
> code
> 
> Object set enabled(button;$1)
> 
> Regards
> Chuck
> Sent from my iPhone
> 
>> On Apr 20, 2017, at 2:52 PM, Lee Hinde via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> I got bit last night with this code:
>> 
>> *C_BOOLEAN*(*$1*)
>> 
>> 
>> *If *(*$1*)
>> 
>> *EXECUTE FORMULA*("OBJECT SET ENABLED(FND_IO_OKBUTTON_I;True)")
>> 
>> *Else *
>> 
>> *EXECUTE FORMULA*("OBJECT SET ENABLED(FND_IO_OKBUTTON_I;False")
>> 
>> *End if   *//Ok to save
>> 
>> On the second Execute Formula, there's a missing close parenthesis. Oops.
>> (this is sort of related to the other conversation about code reviewers...
>> 
>> The original method (written in 2005) was using Enable/Disable button and I
>> 'updated' (broke) it.
>> 
>> My question is, why would that need to be in Execute Formula? There's
>> nothing being computed, which is the typical use case that I know of for
>> using Execute Formula.  This is a Foundation based system, so there may be
>> something involved in talking between components and the host database.
>> 
>> Is there some reason to do it this way, or can I future proof myself and
>> just call the Object Set Enabled directly.


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to