# XRCise says "Cannot create wrapper for subclass of wxWizard"

**URL:** <https://www.ruby-forum.com/t/xrcise-says-cannot-create-wrapper-for-subclass-of-wxwizard/119907>\
**Category:** wxRuby\
**Created:** [November 12, 2007, 3:22am UTC](https://www.ruby-forum.com/t/xrcise-says-cannot-create-wrapper-for-subclass-of-wxwizard/119907 "2007-11-12T03:22:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 12, 2007, 3:22am UTC](https://www.ruby-forum.com/t/xrcise-says-cannot-create-wrapper-for-subclass-of-wxwizard/119907/1 "2007-11-12T03:22:46Z")

</div>

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"?\> wxDEFAULT\_DIALOG\_STYLE|wxCAPTION|wxRESIZE\_BORDER|wxSYSTEM\_MENU|wxCLOSE\_BOX wxWIZARD\_EX\_HELPBUTTON Me Wizard wizard.png wxTAB\_TRAVERSAL #FFFFFF oooh.png wxVERTICAL wxGROW|wxALL 5 This is some static text.

Thank you kindly for any advice you can offer,  
Peralta

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 30, 2008, 2:43am UTC](https://www.ruby-forum.com/t/xrcise-says-cannot-create-wrapper-for-subclass-of-wxwizard/119907/2 "2008-01-30T02:43:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 12, 2007, 8:41pm UTC](https://www.ruby-forum.com/t/xrcise-says-cannot-create-wrapper-for-subclass-of-wxwizard/119907/3 "2007-11-12T20:41:17Z")

</div>

removed\_email\_address@domain.invalid 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

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 30, 2008, 6:43am UTC](https://www.ruby-forum.com/t/xrcise-says-cannot-create-wrapper-for-subclass-of-wxwizard/119907/4 "2008-01-30T06:43:24Z")

</div>

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 S.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 21, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/xrcise-says-cannot-create-wrapper-for-subclass-of-wxwizard/119907/5 "2008-02-21T23:38:13Z")

</div>

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.
