BROWSE() in testtcbr.prg

BROWSE() in testtcbr.prg

Postby Ollie » Mon Jan 08, 2007 2: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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41937
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Ollie » Tue Jan 09, 2007 6: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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby Antonio Linares » Tue Jan 09, 2007 7:31 am

Ollie,

Because inside function Browse() some codeblocks are defined by default:
Code: Select all  Expand view
   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
User avatar
Antonio Linares
Site Admin
 
Posts: 41937
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

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