FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour eval an action - Resolved!!
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
eval an action - Resolved!!
Posted: Tue Mar 05, 2024 11:57 AM
if I have in an archive field "dummy1()"
How do I make it work in a button?
that is, I did it

I saved the archive in an aImg array


local bClick:= {|| aImg[5 ] }

@ nRow, nCol BTNBMP oItem PROMPT aImg[ 1 ] ;
FILE aImg[2 ] ;
SIZE 72,96 PIXEL OF oPanel ;
NOBORDER FLAT

oItem:oCursor:= oCursorBtn
oItem:baction:= (bClick)

not eval the action
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 309
Joined: Wed Mar 28, 2018 04:38 PM
Re: eval an action
Posted: Tue Mar 05, 2024 01:28 PM
try
Code (fw): Select all Collapse
local bClick:= {|| &aImg[5 ] }
--------

¿ Y porque no ?

¿ And why not ?
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: eval an action - resolved
Posted: Tue Mar 05, 2024 04:58 PM
Resolved with

local cAction:= aImg[5 ]
local bClick := &( "{|| " + cAction + "}" )

saw on fwh\samples\barsetup.prg
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion