Another TBrowse bug

This is a discussion on Another TBrowse bug within the xharbour forums in Programming Languages category; Hello. All! After row append tbrowse object is disappeared and positioned in the incorrect row. See test below Function Main() Local oB, n, cField Local bIndexKey, xIndKey Field NN cls dbCreate('test', {{'NN', 'N', 3, 0},{'CC', 'C', 30, 0}}) use test new index on nn to test set index to test dbAppend() Field->NN := 1 Field->CC := '1' dbAppend() Field->NN := 3 Field->CC := '3' dbAppend() Field->NN := 5 Field->CC := '5' oB := TBrowseDB(1,1,18,50) for n := 1 to FCount() cField := FieldName( n ) oB:AddColumn( TBColumnNew( cField, FieldBlock( cField ) ) ) next oB:goBottom() oB:ForceStable() wait // append new ...

Go Back   Application Development Forum > Programming Languages > xharbour

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-21-2008, 02:33 AM
tpe2@mail.ru
Guest
 
Default Another TBrowse bug

Hello. All!

After row append tbrowse object is disappeared and positioned in the
incorrect row. See test below

Function Main()
Local oB, n, cField
Local bIndexKey, xIndKey
Field NN

cls
dbCreate('test', {{'NN', 'N', 3, 0},{'CC', 'C', 30, 0}})
use test new
index on nn to test
set index to test
dbAppend()
Field->NN := 1
Field->CC := '1'
dbAppend()
Field->NN := 3
Field->CC := '3'
dbAppend()
Field->NN := 5
Field->CC := '5'
oB := TBrowseDB(1,1,18,50)
for n := 1 to FCount()
cField := FieldName( n )
oB:AddColumn( TBColumnNew( cField, FieldBlock( cField ) ) )
next
oB:goBottom()
oB:ForceStable()
wait

// append new row
dbAppend()
Field->NN := 2
Field->CC := '2'

// object stabilization
bIndexKey := &('{||' + IndexKey() + '}')
xIndKey := Eval(bIndexKey)

DispBegin()
oB:refreshAll()
oB:ForceStable()
oB:autoLite = .f.
while Eval(bIndexKey) > xIndKey .and. ! oB:hitTop

oB:up()
oB:ForceStable()

enddo
oB:AutoLite = .t.
oB:Hilite()
DispEnd()
wait
return nil

Best regards, Pavel Tsarenko
Reply With Quote
  #2  
Old 08-21-2008, 05:26 AM
Saulius
Guest
 
Default Re: Another TBrowse bug

Pavel,

It's worth a try tbrowse class in \tests\tbrowse.prg, borrowed from Harbour.
Very good Przemek job & Clipper compatibility!

Best regards,
Saulius


Reply With Quote
  #3  
Old 08-25-2008, 02:46 PM
modalsist@yahoo.com.br
Guest
 
Default Re: Another TBrowse bug

Pavel,

Should be fixed with ChangeLog,v 1.6198 2008/08/25

regards,
Eduardo

On 21 ago, 03:33, t...@mail.ru wrote:
> Hello. All!
>
> After row append tbrowse object is disappeared and positioned in the
> incorrect row. See test below
>
> Function Main()
> Local oB, n, cField
> Local bIndexKey, xIndKey
> Field NN
>
> cls
> dbCreate('test', {{'NN', 'N', 3, 0},{'CC', 'C', 30, 0}})
> use test new
> index on nn to test
> set index to test
> dbAppend()
> Field->NN := 1
> Field->CC := '1'
> dbAppend()
> Field->NN := 3
> Field->CC := '3'
> dbAppend()
> Field->NN := 5
> Field->CC := '5'
> oB := TBrowseDB(1,1,18,50)
> for n := 1 to FCount()
> * *cField := FieldName( n )
> * *oB:AddColumn( TBColumnNew( cField, FieldBlock( cField ) ) )
> next
> oB:goBottom()
> oB:ForceStable()
> wait
>
> // append new row
> dbAppend()
> Field->NN := 2
> Field->CC := '2'
>
> // object stabilization
> bIndexKey := &('{||' + IndexKey() + '}')
> xIndKey := Eval(bIndexKey)
>
> DispBegin()
> oB:refreshAll()
> oB:ForceStable()
> oB:autoLite = .f.
> while Eval(bIndexKey) > xIndKey .and. ! oB:hitTop
>
> * *oB:up()
> * *oB:ForceStable()
>
> enddo
> oB:AutoLite = .t.
> oB:Hilite()
> DispEnd()
> wait
> return nil
>
> Best regards, Pavel Tsarenko


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:18 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.