Page 1 of 1

eval an action - Resolved!!

PostPosted: Tue Mar 05, 2024 11:57 am
by Silvio.Falconi
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
Image

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

Re: eval an action

PostPosted: Tue Mar 05, 2024 1:28 pm
by VictorCasajuana
try
Code: Select all  Expand view

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

Re: eval an action - resolved

PostPosted: Tue Mar 05, 2024 4:58 pm
by Silvio.Falconi
Resolved with

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

saw on fwh\samples\barsetup.prg