Page 3 of 3

PostPosted: Thu Jan 24, 2008 10:43 am
by nageswaragunupudi
OrdKeyNo() always works.
If we are browsing arrays we should consider Array row number. Like that depending on what we browse we shoud write the code.

But we were looking for a common solution which works irrespective of the data source being browsed.

It is good if we can make our code for common tasks as generic and as reusable as possible. That improves the productivity of normal application development.

PostPosted: Thu Jan 24, 2008 11:18 am
by James Bott
NageswaraRao,

>But we were looking for a common solution which works irrespective of the data source being browsed.

Agreed. I haven't found a good common solution. I just posted the OrdKeyNo() as a temporary solution for DBFs.

James

PostPosted: Tue Jan 29, 2008 4:56 pm
by Maurizio
Hello James

I try your sample

oBrw:bClrStd:= {|| if( (cAlias)->(ordkeyno()) % 2 == 0 ,{ CLR_BLACK, COLOR_LIGHT },{ CLR_BLACK, COLOR_DARK }) }

works fine but if you keep press the key ARROW DOWN after the first page the color remain the same .

Regards Maurizio

PostPosted: Tue Jan 29, 2008 5:53 pm
by James Bott
Maurizio,

It works fine here with the down arrow. Are you using my example code or did you put this into your own program? I suggest trying my example program listed in a previous message.

James

PostPosted: Tue Jan 29, 2008 6:05 pm
by nageswaragunupudi
Mr James

The logic fails to work when the number of visible rows is an odd number. Continuous colors can be seen in many ways of navigation.

PostPosted: Tue Jan 29, 2008 6:40 pm
by James Bott
NageswaraRao,

>The logic fails to work when the number of visible rows is an odd number. Continuous colors can be seen in many ways of navigation.

I think you are referring to my lClrFlag method, not the OrdKeyNo() method. The ordKeyNo() should not be affected by the number of rows visible in the browse. With ordKeyNo() and 13 visible rows, I do not see the problem.

James

PostPosted: Tue Jan 29, 2008 6:41 pm
by nageswaragunupudi
Yes