pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Lanham <li...@sael.com.au>
Subject Re: TableViewRowEditor and New Records
Date Tue, 15 Sep 2009 21:42:02 GMT
There is no exception this time but the row editor doesn't appear at all if 
invoked immediately after the new row is inserted.

On Wed, 16 Sep 2009 07:26:48 am Todd Volkert 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.j
> >ava:269) at
> >
> > java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java
> >:184) at
> >
> > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.j
> >ava: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