Try changing the line for the loading of the XML resource file from:<br><br>xml.load(&quot;wxFormBuilder\noname.xrc&quot;)<br><br>To:<br><br>xml.load(&quot;wxFormBuilder/noname.xrc&quot;)<br><br>Thankfully, to Ruby and wxWidgets, it doesn&#39;t really need you to use the \ slash to access a file path.<br>
<br>Often times, it&#39;s better to run xrcise as such:<br><br>xrcise -o noname.rb wxFormBuilder/noname.xrc<br><br>This way, doesn&#39;t matter if it&#39;s on Windows, or Linux, it will be able to find the resources just fine.<br>
<br><div class="gmail_quote">On Sat, Nov 15, 2008 at 3:11 PM, Heinrich Piard <span dir="ltr">&lt;<a href="mailto:lists@ruby-forum.com">lists@ruby-forum.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
here is my code. Is still can&#39;t get it to work.<br>
<br>
<br>
# This class was automatically generated from XRC source. It is not<br>
# recommended that this file is edited directly; instead, inherit from<br>
# this class and extend its behaviour there.<br>
#<br>
# Source file: wxFormBuilder\nonam.xrc<br>
# Generated at: Fri Nov 14 17:16:34 -0500 2008<br>
<br>
require &#39;wx&#39;<br>
include Wx<br>
<br>
class CometApplication &lt; Wx::Frame<br>
<br>
 &nbsp;attr_reader :m_statusbar1, :m_toolbar1, :m_textctrl1, :m_button2,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:m_button3<br>
<br>
 &nbsp;def initialize(parent = nil)<br>
 &nbsp; &nbsp;super()<br>
 &nbsp; &nbsp;xml = Wx::XmlResource.get<br>
 &nbsp; &nbsp;xml.flags = 2 # Wx::XRC_NO_SUBCLASSING<br>
 &nbsp; &nbsp;xml.init_all_handlers<br>
 &nbsp; &nbsp;xml.load(&quot;wxFormBuilder\nonam.xrc&quot;)<br>
 &nbsp; &nbsp;xml.load_frame_subclass(self, parent, &quot;MyFrame1&quot;)<br>
<br>
 &nbsp; &nbsp;finder = lambda do | x |<br>
 &nbsp; &nbsp; &nbsp;int_id = Wx::xrcid(x)<br>
 &nbsp; &nbsp; &nbsp;begin<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Wx::Window.find_window_by_id(int_id, self) || int_id<br>
 &nbsp; &nbsp; &nbsp;# Temporary hack to work around regression in 1.9.2; remove<br>
 &nbsp; &nbsp; &nbsp;# begin/rescue clause in later versions<br>
 &nbsp; &nbsp; &nbsp;rescue RuntimeError<br>
 &nbsp; &nbsp; &nbsp; &nbsp;int_id<br>
 &nbsp; &nbsp; &nbsp;end<br>
 &nbsp; &nbsp;end<br>
<br>
 &nbsp; &nbsp;@m_statusbar1 = finder.call(&quot;m_statusBar1&quot;)<br>
 &nbsp; &nbsp;@m_toolbar1 = finder.call(&quot;m_toolBar1&quot;)<br>
 &nbsp; &nbsp;@m_textctrl1 = finder.call(&quot;m_textCtrl1&quot;)<br>
 &nbsp; &nbsp;@m_button2 = finder.call(&quot;m_button2&quot;)<br>
 &nbsp; &nbsp;@m_button3 = finder.call(&quot;m_button3&quot;)<br>
 &nbsp; &nbsp;if self.class.method_defined? &quot;on_init&quot;<br>
 &nbsp; &nbsp; &nbsp;self.on_init()<br>
 &nbsp; &nbsp;end<br>
 &nbsp;end<br>
end<br>
<br>
class MyApp &lt; App<br>
 &nbsp;def initialize()<br>
 &nbsp; &nbsp;CometApplication.new<br>
 &nbsp;end<br>
end<br>
MyApp.new.main_loop()<br>
<br>
I start the code from C:\ruby\ruby_scripts\test.rb and the xrc file is<br>
in C:\ruby\ruby_scripts\wxFormBuilder\nonam.xrc<br>
<div class="Ih2E3d"><br>
<br>
<br>
--<br>
Posted via <a href="http://www.ruby-forum.com/" target="_blank">http://www.ruby-forum.com/</a>.<br>
_______________________________________________<br>
</div><div><div></div><div class="Wj3C7c">wxruby-users mailing list<br>
<a href="mailto:wxruby-users@rubyforge.org">wxruby-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/wxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/wxruby-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mario Steele<br><a href="http://www.trilake.net">http://www.trilake.net</a><br><a href="http://www.ruby-im.net">http://www.ruby-im.net</a><br><a href="http://rubyforge.org/projects/wxruby/">http://rubyforge.org/projects/wxruby/</a><br>
<a href="http://rubyforge.org/projects/wxride/">http://rubyforge.org/projects/wxride/</a><br>