peralta@sonic.net
2007-Nov-12 02:22 UTC
XRCise says "Cannot create wrapper for subclass of wxWizard"
I have created a very simple DialogBlocks project that consists of a very simple wxWizard. I have exported the project to XRC and am trying to get XRCise to process it. XRCise produces the message "Cannot create wrapper for subclass of wxWizard". Is this a symptom of the XPath parsing in Ruby 1.8.6 bug? Or am I doing something wrong? My env: ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] wxruby-1.9.2-i386-mswin32 wx_sugar 0.1.19 Windows XP Professional 5.1.2600 My XRC file: --------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <resource version="2.3.0.1" xmlns="http://www.wxwidgets.org/wxxrc"> <object class="wxWizard" name="ID_MEWIZARD" subclass="MeWizard"> <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX</style> <exstyle>wxWIZARD_EX_HELPBUTTON</exstyle> <title>Me Wizard</title> <bitmap>wizard.png</bitmap> <object class="wxWizardPageSimple" name="ID_WIZARDPAGE1" subclass="MyWizardPage"> <style>wxTAB_TRAVERSAL</style> <bg>#FFFFFF</bg> <bitmap>oooh.png</bitmap> <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="sizeritem"> <flag>wxGROW|wxALL</flag> <border>5</border> <object class="wxStaticText" name="wxID_STATIC"> <label>This is some static text.</label> </object> </object> </object> </object> </object> </resource> ----------------------------------------------------------------------- Thank you kindly for any advice you can offer, Peralta
Alex Fenton
2007-Nov-12 19:40 UTC
[wxruby-users] XRCise says "Cannot create wrapper for subclass of wxWizard"
peralta at sonic.net wrote:> I have created a very simple DialogBlocks project that > consists of a very simple wxWizard. I have exported the > project to XRC and am trying to get XRCise to process it. > XRCise produces the message "Cannot create wrapper for > subclass of wxWizard". >Thanks for the report. It''s because I don''t know how to load a Wizard from XRC - currently only Dialog, Panel and Frame are supported. There are lots of methods in the XmlResource API like load_frame, load_panel etc, but not one it seems for wizards. Using load_dialog doesn''t work although Wizard is technically a subclass of Wx::Dialog. I will have a further look into this, but if anyone knows how to load a Wizard in C++ wxWidgets, that would help... cheers alex
Herman Munster
2008-Jan-30 01:43 UTC
[wxruby-users] XRCise says "Cannot create wrapper for subclass of wxWiz
Hi Peralta, I use wxFormBuilder v3.0 and had the same error message. But I found the solution. For the topmost element "MyFrame1:Frame" in the object tree I can set the value of a parameter "subclass". By default the value is ";" (probably for C++ use), and when I change it to something like "blabla", it works. Cheers, pink-ink -- Posted via http://www.ruby-forum.com/.
Mario Steele
2008-Jan-30 05:42 UTC
[wxruby-users] XRCise says "Cannot create wrapper for subclass of wxWiz
Hello Herman, I also use wxFormBuilder myself, and I ran into the same problem with it. I found this less annoying, as I just put in the class I plan to implement all my methods and such onto the Object in question, and this allows for everything to work when utilizing xrcise. It actually makes it a bit simpler to keep track of what object is what. Heh. L8ers, Mario Steele On 1/29/08, Herman Munster <lists at ruby-forum.com> wrote:> > Hi Peralta, > > I use wxFormBuilder v3.0 and had the same error message. > But I found the solution. > For the topmost element "MyFrame1:Frame" in the object tree I can set > the value of a parameter "subclass". > By default the value is ";" (probably for C++ use), and when I change it > to something like "blabla", it works. > > Cheers, > pink-ink > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ http://rubyforge.org/projects/vwmc/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20080129/a35e5ef0/attachment.html
Robert Armstrong
2008-Feb-21 22:38 UTC
[wxruby-users] XRCise says "Cannot create wrapper for subclass of wxWiz
Thanks for the helpful hint. I had just run into this with the current RC of wxFormBuilder 3.0. Setting the subclass value to any valid text solves the error message. -- Posted via http://www.ruby-forum.com/.