pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Volkert <tvolk...@gmail.com>
Subject Re: TableViewRowEditor and New Records
Date Tue, 15 Sep 2009 21:47:25 GMT
Scott, another thing that could be causing this type of behavior is if you
were calling UI methods on multiple threads, like in a Task subclass.  If
this is the case, you should be using org.apache.pivot.wtk.TaskAdapter to
run your callback on the event dispatch thread.

-T

On Tue, Sep 15, 2009 at 5:26 PM, Todd Volkert <tvolkert@gmail.com> wrote:

> Very interesting.  The *only* way I could explain this error would be if a
> component was mucking with its parent's component collection in the body of
> validate().  Can you make the following change locally, re-run your test,
> and send us the stack trace:
>
> ===================================================================
> --- wtk/src/org/apache/pivot/wtk/Container.java    (revision 815485)
> +++ wtk/src/org/apache/pivot/wtk/Container.java    (working copy)
> @@ -321,8 +321,7 @@
>              && isVisible()) {
>              super.validate();
>
> -            for (int i = 0, n = components.getLength(); i < n; i++) {
> -                Component component = components.get(i);
> +            for (Component component : components) {
>                  component.validate();
>              }
>          }
>
> Thanks,
> -T
>
>
> On Tue, Sep 15, 2009 at 5:08 PM, Scott Lanham <lists@sael.com.au> wrote:
>
>> On Wed, 16 Sep 2009 06:50:51 am Todd Volkert wrote:
>> > Just following up on this thread, are you all set now Scott with the
>> newest
>> > code from SVN, or are you still getting an exception?
>> >
>> > -T
>>
>> Hi Todd,
>>
>> I still have the problem of adding a new record to the List bound to the
>> TableView and then immediately invoking TableViewRowEditor on the row:
>>
>> Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException
>>         at org.apache.pivot.collections.ArrayList.get(ArrayList.java:358)
>>        at org.apache.pivot.wtk.Container.validate(Container.java:325)
>>        at
>> org.apache.pivot.wtk.Display$ValidateCallback.run(Display.java:30)
>>         at
>> java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>>        at
>>
>> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>>        at
>>
>> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>>        at
>>
>> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>>        at
>> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>>        at
>> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>>        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>>
>
>

Mime
View raw message