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: Custom Class and WTKXSerializer Problem
Date Thu, 05 Nov 2009 01:32:25 GMT
Hi Greg,

Here is the output:

java.lang.ClassCastException: org.apache.pivot.wtk.TableView cannot be cast to testing.TestTableView
        at testing.testing.startup(testing.java:33)
        at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(DesktopApplicationContext.java:94)
        at java.awt.Window.processEvent(Window.java:1820)
        at java.awt.Component.dispatchEventImpl(Component.java:4630)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Window.dispatchEventImpl(Window.java:2475)
        at java.awt.Component.dispatchEvent(Component.java:4460)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        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)


On Thu, 5 Nov 2009 11:25:33 am Greg Brown wrote:
> Hi Scott,
> Where do you see the class cast exception? Your sample app runs fine
> for me.
> G
> 
> On Nov 4, 2009, at 4:09 PM, Scott Lanham wrote:
> > Hi Todd,
> >
> > Attached is some sample code that causes a cast exception.
> >
> > On Thu, 5 Nov 2009 02:30:02 am Todd Volkert wrote:
> >> It should work as you expect.  A few things to check:
> >>
> >>   - Are you constructing it using a <DataTableView> element?
> >>   - If you put a sys-out in your DataTableView constructor, is it
> >> getting
> >>   run?
> >>   - Do you provide a no-args constructor in DataTableView?
> >>
> >> If none of these checks yield any leads, you can send the WTKX in
> >> question,
> >> and I'll have a look.
> >>
> >> -T
> >>
> >> On Tue, Nov 3, 2009 at 8:44 PM, Scott Lanham <lists@sael.com.au>
> >>
> >> wrote:
> >>> Hi,
> >>>
> >>> I have a ScrollPane that contains as it's view a simple subclass of
> >>> TableView
> >>> called DataTableView. When retrieving an instance of DataTableView
> >>> defined in a
> >>> wtkx file using WTKXSerializer.get() a TableView is returned, not a
> >>> DataTableView. The strange thing is that I have previously had
> >>> success
> >>> with a
> >>> custom Form done in the same way. Any clues as to where I may be
> >>> going
> >>> wrong
> >>> is very appreciated.
> >>>
> >>> Cheers,
> >>>
> >>> Scott.
> >
> > <testing.java><testing.xml><TestTableView.java>
> 

Mime
View raw message