Page 1 of 1
BROWSE() in testtcbr.prg
Posted: Mon Jan 08, 2007 2:24 pm
by Ollie
In testtcbr.prg in the fwh\samples folder, it calls the function BROWSE()
The MODIFY, DELETE and PRINT buttons work, and I can't see what functions are called.
When I put BROWSE() in my app, none of the buttons do anything.
Why?
Posted: Tue Jan 09, 2007 12:12 am
by Antonio Linares
Ollie,
FWH function Browse() source code is located at source\function\browse.prg. There you will see that those actions have to be supplied as codeblocks when calling Browse():
function Browse( cTitle, cListName, bNew, bModify, bDelete, bSearch, bList, aColSizes )
Posted: Tue Jan 09, 2007 6:21 am
by Ollie
I know, but in that sample it is simply called as browse().
So my question is - why it is working - without specifying code blocks?
Posted: Tue Jan 09, 2007 7:31 am
by Antonio Linares
Ollie,
Because inside function Browse() some codeblocks are defined by default:
Code: Select all
DEFAULT cTitle := "Browse", cListName := "Fields",;
bNew := { || oLbx:RecAdd(), oLbx:Refresh() },;
bDelete := { || RecDelete( oLbx ) },;
bModify := { || RecModify( oLbx ) },;
bList := { || Report( oLbx ) }