It was in a method to set the Foundation OK button status.

The other use of Execute Formula I found was something about getting an int var 
for the host to talk to the component. But in this case, at least the string 
being executed had been created from text and a variable.

  // Project Method: Fnd_Host_GetIntegerValue (variable name) --> Longint

  // Allows a component to get the value of a host long integer variable.

C_LONGINT($0;Fnd_Host_IntegerValue_t)
C_TEXT($1;$variableName_t)

$variableName_t:=$1

EXECUTE FORMULA("Fnd_Host_IntegerValue_t:="+$variableName_t)

$0:=Fnd



> On Apr 20, 2017, at 12:48 PM, Wayne Stewart via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Lee,
> 
> Just a guess but where is this code?
> 
> It's probably a way of getting around the fact that a component can't
> access a host variable or vice versa.
> 
> Foundation 5 was written for v11 and this was before a lot of control by
> object name stuff was available.
> 
> In fact a lot of this code is inherited from the v2003/2004 version 4 which
> was the last Dave B version.  In the component architecture back then you
> could access variables from the other scope via execute.
> 
> Wayne
> 
> 
> On Fri, 21 Apr 2017 at 05:34, 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
>>> **********************************************************************
>> 
>> **********************************************************************
>> 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
>> **********************************************************************
> 
> -- 
> 
> Regards,
> 
> Wayne
> 
> 
> [image: --]
> Wayne Stewart
> [image: http://]about.me/waynestewart
> <http://about.me/waynestewart>
> **********************************************************************
> 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
> **********************************************************************

**********************************************************************
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