Page 1 of 1

dcsay called from a function inside the valid condition

Posted: Tue Apr 16, 2019 4:14 am
by unisoft
Hi,

What is the simplest way to make the DCsay called from the valid condition show on the active screen ?

Regards

i.e.

@ 1,1 DCsay "Code " get m->code valid { || getname(m->code) }
.....
DCREAD GUI


function getname
parameter mcode
seek mcode
....
@ 2,2 DCsay dbffile->name
return

Re: dcsay called from a function inside the valid condition

Posted: Tue Apr 16, 2019 5:02 am
by Wolfgang Ciriack

Code: Select all

local myname:=space(20)
@ 1,1 DCSAY "Code " get m->code valid { || myname:=getname(m->code), dc_getrefresh(oName), .T. }
@ 2,1 DCSAY {|| myname } OBJECT oName
.....
DCREAD GUI

function getname(code)
dbffile->(dbseek(code))
....
return dbffile->name

Re: dcsay called from a function inside the valid condition

Posted: Tue Apr 16, 2019 9:48 am
by unisoft
Thanks for the hint, if this the simplest coding.

Regards

Re: dcsay called from a function inside the valid condition

Posted: Tue Apr 16, 2019 10:13 am
by rdonnay
if this the simplest coding.

In the world of GUI, object oriented, applications this is considered a simple solution.

You cannot just draw stuff on the screen the way you could in Clipper text-based applications.