[wxruby-users] xrcise question
Mario Steele
mario at ruby-im.net
Fri Nov 14 13:49:49 EST 2008
Hello Heinrich,
What you will need to do, is goto your main Window form, and scroll down on
the properties page, you will see a field that says Subclass, and have a
semi-colon in it, with a + next to the field name. You need to click that
plus, and put what name you want your ruby class to be named as.
EG:
MyFrame
This will tell XRCise when it generates the wrapper, that the class to use,
will be MyFrame.
hth,
Mario
On Fri, Nov 14, 2008 at 12:39 PM, Heinrich Piard <lists at ruby-forum.com>wrote:
> Alex Fenton wrote:
> > Heinrich Piard wrote:
> >> where can I find a tutorial like "How to use wxFormbuilder with ruby"?
> >>
> >> I want to transform xrcise code into ruby code and don't know how to do
> >> this.
> >
> > http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise
> >
> > Note that XRCise doesn't generate ruby code for the layout - but it
> > writes all the boring code that loads your layout from XML. This means
> > your handwritten classes can concentrate on event handling without
> > having to write heaps of layout code.
> >
> > Any probs, feel free to ask
> > alex
>
>
> Hi Alex,
>
> thanks!
>
> I prepared everything and started a test but it didn't work.
> I created a xrc file and no used xrcise -o test.rm nonam.xrc and get the
> following error message:
> Cannot create wrapper for class without 'subclass' attribute
>
> Here the xrc xml:
> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
> <resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
> <object class="wxFrame" name="MyFrame1">
> <style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
> <size>554,553</size>
> <title></title>
> <object class="wxGridSizer">
> <rows>500</rows>
> <cols>3</cols>
> <vgap>0</vgap>
> <hgap>0</hgap>
> </object>
> <object class="wxStatusBar" name="m_statusBar1">
> <style>wxST_SIZEGRIP</style>
> <fields>1</fields>
> </object>
> <object class="wxToolBar" name="m_toolBar1">
> <style>wxTB_HORIZONTAL</style>
> <bitmapsize></bitmapsize>
> <margins></margins>
> <packing>1</packing>
> <separation>5</separation>
> <object class="wxTextCtrl" name="m_textCtrl1">
> <value>enter ticker</value>
> <maxlength>0</maxlength>
> </object>
> <object class="wxButton" name="m_button2">
> <pos>-1,-1</pos>
> <label>Start</label>
> <default>0</default>
> </object>
> <object class="wxButton" name="m_button3">
> <label>Stop</label>
> <default>0</default>
> </object>
> </object>
> </object>
> </resource>
>
> --
> 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20081114/6ef4b784/attachment.html>
More information about the wxruby-users
mailing list