| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| |||
| |||
| Pavel, It's worth a try tbrowse class in \tests\tbrowse.prg, borrowed from Harbour. Very good Przemek job & Clipper compatibility! Best regards, Saulius |
|
#3
| |||
| |||
| 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 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.