BROWSE() in testtcbr.prg

Post Reply
Ollie
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

BROWSE() in testtcbr.prg

Post 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?
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Ollie
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Post 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?
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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 ) }
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply