XRC-related question
Cees De Groot
cdegroot at gmail.com
Wed Jul 27 16:24:26 UTC 2005
On 7/27/05, Rob Gayvert <rtg at rochester.rr.com> wrote:
> >Got my 'message dialog with check box' component now. And my first XRC UI!
> Very cool, and definitely a Good Thing.
>
Well, never content to let software just work, I upped the complexity a bit :)
I have painted a XRC with a custom object on it - my particular flavor
of a pluggable list.
WxXmlResourceHandler subclass: #DGVPluggableListXmlResourceHandler ....
canHandle: xmlNode
^self isOfClass: xmlNode classname: DGVPluggableList
doCreateResource
| list |
list := DGVPluggableList ....
and #initializeStyles, and class #new just the same as the sample. The
top-level object I need to get from the XRC is a frame, so:
res := WxXmlResource new.
res initAllHandlers.
res addHandler: DGVPluggableListXmlResourceHandler new.
res loadFromString: self class resourceText.
view _ WxFrame new.
res loadFrame: view parent: nil name: 'frame'.
but this results in a Wx error dialog 'Subclass 'DGVPluggableList' not
found for 'listCtrl', not subclassing!'. So it seems that a step is
missing to register my pluggable list class with Wx or something like
that?
(I like XRC so far. UI's look much better with a bit trial and error
in wxGlade than when you have to manually specify them...)
More information about the Wxsqueak
mailing list