FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour BROWSE() in testtcbr.prg
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
BROWSE() in testtcbr.prg
Posted: Mon Jan 08, 2007 02:24 PM

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)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
BROWSE() in testtcbr.prg
Posted: Tue Jan 09, 2007 12:12 AM

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
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
BROWSE() in testtcbr.prg
Posted: Tue Jan 09, 2007 06:21 AM

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)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
BROWSE() in testtcbr.prg
Posted: Tue Jan 09, 2007 07:31 AM
Ollie,

Because inside function Browse() some codeblocks are defined by default:
   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

Continue the discussion