Subject Re: [IBO] Problem in IsEmpty method
Author Jason Wharton
Possible so.
I'll log this as a potential bug.

What version are you using?

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Luiz Alves" <cprmlao@...>
To: <ibobjects@yahoogroups.com>
Sent: Tuesday, November 20, 2001 2:53 PM
Subject: [IBO] Problem in IsEmpty method


> Jason,
>
> I think there is a small problem with 'isempty' in tib_query.
>
> query: select * from clientes
>
> Ordering Items:
> Prontuário=PRONT;PRONT DESC
> Paciente=NOME;NOME DESC
>
> Ordering Links:
> PRONT=ITEM=1;POS=0
> NOME=ITEM=2;POS=0
>
> 1. I open a query with OrderingItemNo=0.
>
> 2. I order by Pront field in asc order(OrderingItemNo=1) and go to end of
> dataset(with last button of a navigator)
>
> 3. Now, if I test for 'query.isempty' it returns TRUE, although the
> dataset is not empty.
>
> 4. If I go to first record of the dataset(with first button of a
navigator),
> the problem goes away.
>
>
>
> I am trying track the problem and it seems to be in 'ValidateRows( 1, 1 )'
> called from function: TIB_BDataset.GetIsEmpty: boolean;
>
> There are many comparations between variables in this function and I don't
> achieve fix it.
>
> I think that problem is related to sign of BufferRowNum. In IBO 4,
> BufferRowNum can assume values positives and negatives and the
comparations
> in the function mentioned above are not works as due.
>
> I had similar problems on event OnGetCellProps from Tib_Grid due negative
> sign of BufferRowNum and I used another approach to do it work, as next
code
> below, to paint alternate rows in different colors:
>
> if ((abs(BufferRowNum) >= 0) and (AColor <> clHighlightText))then begin
> if (abs(ARow) mod 2)=0 then
> AColor:=clYellow
> else AColor:=clGreen
>
>
> Regards,
>
> Luiz.