Hi!
In TBROWSE.PRG, there's a HIDDEN property named
::lNewRow for TDataCache() class. IMHO, it must be
removed:
1) ::lNewRow uses EOF() function to work. TBrowse
shall not be aware about any kind of data
source.
2) Since EOF() doesn't have any alias assignment,
it would produce wrong results (sample included).
3) An "append mode" record should be managed by
user's code.
Can I remove it?
Atte.
Vic
PROCEDURE MAIN
LOCAL oTB, oColumn
DBCREATE("MAIN",{{"KEY1","C",10,0}})
DBCREATE("CATALOG",{{"KEY1","C",10,0},{"KEY2","C",10,0}})
USE CATALOG NEW
INDEX ON KEY1 TO CATALOG
USE MAIN NEW
APPEND BLANK
REPLACE KEY1 WITH "A"
APPEND BLANK
REPLACE KEY1 WITH "B"
APPEND BLANK
REPLACE KEY1 WITH "C"
SET RELATION TO KEY1 INTO CATALOG
SELECT CATALOG
APPEND BLANK
REPLACE KEY1 WITH "A"
REPLACE KEY2 WITH "AA"
GO TOP
MAIN->( DBGOTOP() )
CLS
@ 0,0 TO MAXROW(),MAXCOL()
oTB := TBrowseNew( 1, 1, MAXROW() - 1, MAXCOL() - 1 )
oTB:AddColumn( TBColumnNew( "KEY1", { || MAIN->KEY1 } ) )
oTB:AddColumn( TBColumnNew( "KEY2", { || CATALOG->KEY2 } ) )
oTB:GoTopBlock := { || MAIN->( DBGOTOP() ) }
oTB:GoBottomBlock := { || MAIN->( DBGOBOTTOM() ) }
oTB:SkipBlock := { |n| MAIN->( DBSKIPPER( n ) ) }
DO WHILE .T.
oTB:ForceStable()
IF oTB:ApplyKey( INKEY( 0 ) ) == -1 // TBR_EXIT
EXIT
ENDIF
ENDDO
CLOSE ALL
RETURN
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers