eval an action - Resolved!!

eval an action - Resolved!!

Postby Silvio.Falconi » 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
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
Last edited by Silvio.Falconi on Tue Mar 05, 2024 4:59 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: eval an action

Postby VictorCasajuana » Tue Mar 05, 2024 1:28 pm

try
Code: Select all  Expand view  RUN

local bClick:= {|| &aImg[5 ] }
 
--------
¿ Y porque no ?
¿ And why not ?
User avatar
VictorCasajuana
 
Posts: 265
Joined: Wed Mar 28, 2018 4:38 pm
Location: Vinaròs

Re: eval an action - resolved

Postby Silvio.Falconi » Tue Mar 05, 2024 4: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests