[HELP] Facing a datagrid bug
andre at andregarzia.com
Tue Aug 16 12:14:21 EDT 2011
On Tue, Aug 16, 2011 at 1:09 PM, Andre Garzia <andre at andregarzia.com> wrote:
> On Tue, Aug 16, 2011 at 12:58 PM, Andre Garzia <andre at andregarzia.com>wrote:
>> the error is not on sorting, it is on:
>> some error in an object reference... odd... only when ascending, the
>> descending sort works.
> I think I found it. When sorting ascending, the pIndexesToDraw variable
> which contains a comma separated list of indexes, has an extra comma like:
> So it fails. I think I might have uncovered a bug somewhere
I've added the following code to the data grid library:
## Default is not to pass in value for pIndexes to draw in which case
## we use the base sequence for visible controls to determine indexes
if pIndexesToDraw is not empty then
put itemOffset(item 1 of pIndexesToDraw, sIndexSequencing) - 1 into
put item sTableObjectsA["base sequence for visible controls"] to \
(sTableObjectsA["base sequence for visible controls"] +
sTableObjectsA["row control count"] - 1) of sIndexSequencing into
put sTableObjectsA["base sequence for visible controls"] - 1 into
## AAG: Below I fix a possible bug
repeat while char 1 of pIndexesToDraw is not a number
delete char 1 of pIndexesToDraw
if pIndexesToDraw is empty then
With that in place, everything starts working.
> http://www.andregarzia.com All We Do Is Code.
http://www.andregarzia.com All We Do Is Code.
More information about the Use-livecode