Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Lee Hinde via 4D_Tech
Phew. Thanks. > On Apr 20, 2017, at 4:56 PM, Wayne Stewart via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Lee, > > Yes it's a Foundation v4 workaround for 2003/2004 > > > Regards, > > Wayne > > > [image: --] > Wayne Stewart > [image: http://]about.me/waynestewart >

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Wayne Stewart via 4D_Tech
Lee, Yes it's a Foundation v4 workaround for 2003/2004 Regards, Wayne [image: --] Wayne Stewart [image: http://]about.me/waynestewart On 21 April 2017 at 09:55, Lee Hinde via 4D_Tech <4d_tech@lists.4d.com> wrote: > Is that a historical thing? I’m in v15 on th

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Lee Hinde via 4D_Tech
Is that a historical thing? I’m in v15 on this database now and it seems to work if I call OBJECT SET ENABLED(FND_IO_OKBUTTON_I;True)” directly. (in the host database…) > On Apr 20, 2017, at 4:52 PM, Walt Nelson via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Lee, > > That is EXACTLY why. >

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Walt Nelson via 4D_Tech
Lee, That is EXACTLY why. Thanks, Walt Nelson (Seattle) New stuff coming! www.foundationshell.com w...@foundationshell.com > On Apr 20, 2017, at 11:52 AM, Lee Hinde via 4D_Tech <4d_tech@lists.4d.com >

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Wayne Stewart via 4D_Tech
I'd definitely go with Chuck's suggestion in that case! Regards, Wayne [image: --] Wayne Stewart [image: http://]about.me/waynestewart On 21 April 2017 at 09:34, Lee Hinde wrote: > Yes, it’s an old database. This is a host method. > > > > On Apr 20, 2017, a

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Lee Hinde via 4D_Tech
Yes, it’s an old database. This is a host method. > On Apr 20, 2017, at 4:25 PM, Wayne Stewart via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Lee, > > Is this Foundation code or code in the host database? > > What is the method called? > > My assumption is that this is an older database fro

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Wayne Stewart via 4D_Tech
Lee, Is this Foundation code or code in the host database? What is the method called? My assumption is that this is an older database from pre v11 that's been updated. Regards, Wayne [image: --] Wayne Stewart [image: http://]about.me/waynestewart On 21 Apri

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Lee Hinde via 4D_Tech
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,

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Lee Hinde via 4D_Tech
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:

[offish] Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Chip Scheide via 4D_Tech
Not to answer the original question.. sorry. But I did come across this wonderful bit of coding. Hours to try to figure out WTF was going on. TLDR; Execute Formula (method) called from within a different Execute Formula (method) Import routine : - run the code, import the data, not quite right

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Wayne Stewart via 4D_Tech
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

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Chuck Miller via 4D_Tech
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*)

Re: Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Kirk Brooks via 4D_Tech
I've seen stuff like this in code maintained by folks who are good programmers but not particularly well versed in 4D. I think it makes sense from a different perspective. On Thu, Apr 20, 2017 at 11:52 AM, Lee Hinde via 4D_Tech < 4d_tech@lists.4d.com> wrote: > I got bit last night with this code:

Why would you do this? (Execute Formula Question.)

2017-04-20 Thread Lee Hinde via 4D_Tech
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 parenthes