[lazarus] TDBGrid question
Jeroen van Iddekinge
iddekingej at lycos.com
Mon May 19 05:19:06 EDT 2003
Hi,
If I simulate what ShiftBuffersUp and ShiftBufferDown do, I think
thats wrong
First what shiftbuffersup does:
For example
Buffer: 0123456 (numbers ar original content of buffer before call to shift buffersup )
procedure is called with the following:
Offset=2
Distance=3
Buffercount=7:
FirstMove
move1:
"Move(FBuffers[Offset],Temp^,MoveSize);"
Temp=234 (temp containts the old buffer 2,3 and 4)
buffer=unchanged
move2:
Move(FBuffers[Offset+Distance],FBuffers[Offset],
(FBufferCount-Distance-Offset)*SizeOf(Pchar));
=5 =2 (2)*sizeof()
Temp=unchanged
buffer=01563456
move3:
Move(Temp^,FBuffers[FBufferCount-Distance-Offset],MoveSize);
2 (3)*sizeof
temp=unchanged
buffer=0123456 <==final.
If i look at the result i find it verry strange...
So far as I understand what procedure ShiftBuffersDown does, it rotate all the buffers. Thats compleetly different what ShiftBuffersUp does. For
rotation you don't need an offset parameter, so why does ShiftBuffers have a 'offset' parameter?
Greez,
jeroen van Iddekinge
--------- Original Message ---------
DATE: Mon, 19 May 2003 10:55:53
From: Michael Van Canneyt <michael.vancanneyt at wisa.be>
To: lazarus at miraclec.com
Cc:
>
>
>On Mon, 19 May 2003 hernan.et at pg.com wrote:
>
>>
>>
>> Hi Jesus,
>>
>> I have tried using TDBGrid and it work quite well. But I noticed that I cannot
>> scroll backward when my table contains more than 10, (my table contains 56
>> rows). I have tried to track it down and it seems that the problem is somewhere
>> in TDataset or its parent(s). Can someone have a look on this?
>
>I've had this issue in the past, and I suspect has something to do with the buffer
>scrolling. I have not yet been able to pinpoint the exact error, however.
>
>The procedure you want is in dataset.inc, line 1634
>
>Procedure TDataset.ShiftBuffers (Offset, Distance : longint);
>
>Subprocedure 'shiftbuffersdown'.
>
>I currently do not have enough time to look at it, but if someone else
>has, the above info may help to pinpoint the exact problem.
>
>Michael.
>
>_________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
>
More information about the Lazarus
mailing list