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:58:17 GMT
Just constructing the class and doing nothing with it works fine.

On Thu, 5 Nov 2009 11:47:56 am Greg Brown wrote:
> What happens if you try to instantiate your sample class in Java code?
> 
> On Nov 4, 2009, at 8:45 PM, Scott Lanham wrote:
> > It's SVN from yesterday.
> >
> > On Thu, 5 Nov 2009 11:42:42 am Greg Brown wrote:
> >> Also, what version of Pivot are you running? Is it a release or built
> >> from SVN? If SVN, is it the latest code?
> >>
> >> On Nov 4, 2009, at 8:41 PM, Greg Brown wrote:
> >>> Huh. That line executes without issue for me. Can you step into the
> >>> code to see what is actually happening in get()?
> >>>
> >>> On Nov 4, 2009, at 8:32 PM, Scott Lanham wrote:
> >>>> 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