Dvora,

could it be that you have e selection callback handler in place that somehow
is called when the row is removed (and thus the selection disappears or
changes)? At least if you removed the last row of the table that would most
likely create a problem.

I remember vaguely to have had a similiar problem and had either disabled
the selection handler temporarily or changed something else in my code
(sorry to not be able to be more specific). Another thing I remember is that
I had a for-loop once inside which I removed rows. This obviously fails if
you iterate through the for-loop in a forward direction (increasing index),
as the length after removing a row is smaller than when the for-loop
started. If you run the for-loop backwards (from i=length-1 to 0) then this
problem does not occur.

Just some thoughts, I doubt that you are running into a Qooxdoo-bug, but
rather some not obvious problem in your code.

Cheers,
Fritz

On Wed, 4 Apr 2012, Debora Lopez wrote:

> Hi,
>
> I managed a work-around today.  I finally realized that the row was being
> removed from the model, even though the exception was being raised.  So, I
> put the removeRows command in a try-catch and ignore the exception.  I
> don't like doing this - because it could cause other problems, but that's
> my solution for now.
>
> Regards,
> Dvora
>
>
>
> From:   Tristan Koch <tristan.k...@1und1.de>
> To:     qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
> Date:   04/04/2012 14:35
> Subject:        Re: [qooxdoo-devel] Problem with removeRows command in
> Simple  table   model
>
>
>
> Hi Debora,
>
> so in other words tableModel.getData().length is greater than
> index_of_row_selected?
>
> index_of_row_selected is positive?
>
> Regards
> Tristan
>
> Am 02.04.2012 um 09:52 schrieb Debora Lopez:
>
>> Hi,
>>
>> I'm working with Simple table model.  I have a delete button.  When the
> user presses delete, I want to remove the row selected from the model.
>> My command for this is:
>>
>> tableModel.removeRows(index_of_row_selected,1);
>>
>> I keep getting messages like this one:
>> this.__rowArr out of bounds: 11 (0..11)
>> where the 11 is the number of rows in the table.
>>
>> index_of_row_selected is less than the number of rows in the table.
>>
>> Anybody have any suggestions?
>> TIA.
>>
>> Dvora Lopez
> ------------------------------------------------------------------------------
>> This SF email is sponsosred by:
>> Try Windows Azure free for 90 days Click Here
>>
> http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
>
>> qooxdoo-devel mailing list
>> qooxdoo-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>

-- 
Oetiker+Partner AG              tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to