The following code is not working with FWH 8.04. It shows error as below.
- Code: Select all Expand view RUN
#include 'fivewin.ch'
#include 'xbrowse.ch'
Function Main
local oDlg, oLbx, oBtn, oSay, oGet
local aMonths := {}
local n, o, x, z, cField, nMonth, nYear, dStart, lSave, cPeriod, cOpen
for n := 1 to 12
aadd( aMonths , { 'Month '+str(n), ;
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ;
'1', '1', ' ', ' ', '1', ' ', ' ', ' ', ' ', ' ', ;
' ', ' ', ' ', '1', ' ', ' ', ' ', ' ', ' ', ' ', ;
' ' } )
next
DEFINE DIALOG oDlg FROM 0, 0 TO 500,800 TITLE 'Yield Management' PIXEL
@ 0, 0 XBROWSE oLbx ARRAY aMonths ;
COLUMNS 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ,;
11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ,;
21, 22, 23, 24, 25, 26, 27, 28, 29, 30 , 31, 32 ;
HEADERS 'Month/Year', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', ;
'11', '12', '13', '14', '15', '16', '17', '18', '19', '20', ;
'21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31' ;
FIELDSIZES 130, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, ;
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, ;
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ;
OF oDlg
for x := 2 to 32
oLbx:aCols[x]:AddBmpFile("GO.BMP")
oLbx:aCols[x]:bBmpData := GenBlock( oLbx, x )
oLbx:aCols[x]:nDataBmpAlign := AL_CENTER
next
oDlg:oClient := oLbx
oLbx:CreateFromCode()
ACTIVATE DIALOG oDlg ON INIT ( oLbx:SetFocus(), oDlg:ReSize() )
return nil
function GenBlock( oLbx, x )
return { || If( Eval( oLbx:aCols[ x ]:bStrData ) == '1', 1, 0 ) }
- Code: Select all Expand view RUN
Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL
Args:
[ 1] = U
Stack Calls
===========
Called from: => EVAL(0)
Called from: testxb.prg => (b)GENBLOCK(50)
Called from: XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA(0)
Called from: XBROWSE.PRG => TXBROWSE:PAINT(0)
Called from: XBROWSE.PRG => TXBROWSE:DISPLAY(0)
Called from: CONTROL.PRG => TXBROWSE:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: testxb.prg => MAIN(44)