Displaying 14 results from an estimated 14 matches for "load_frame_subclass".
2007 Apr 29
0
[987] branches/wxruby2/wxwidgets_282/samples/listbook/listbook.rb: Use default constructor before load_frame_subclass to avoid GTK crash
...:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[987] branches/wxruby2/wxwidgets_282/samples/listbook/listbook.rb: Use default constructor before load_frame_subclass to avoid GTK crash</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>987</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2007-04-29 10:12:45 -0400 (Sun, 29 Apr 2007)&l...
2007 Apr 28
6
XRC Problem
...9;
rescue LoadError
raise no_wx_err
end
end
module XrcEnabled
def getXrcControl(id)
return find_window_by_id( Wx::xrcid(id) )
end
end
class ContactList < Wx::Frame
include XrcEnabled
def initialize()
super(nil,-1,"RubyIM")
$xml.load_frame_subclass(self,nil,"ContactList")
# Grab all the controls for what I''m creating
end
end
class RubyIMApp < Wx::App
def on_init
$xml = Wx::XmlResource.get();
$xml.init_all_handlers();
xrc_file = File.join( File.dirname(__FILE__), "xrc",...
2007 Apr 13
0
[962] branches/wxruby2/wxwidgets_282/doc/textile/xmlresource.txtl: Fixed the documentation for load_*_subclass, where * is [Dialog, Panel, Frame].
...ce#load_dialog":#XmlResource_loaddialog
</span><ins>+* "XmlResource#load_dialog_subclass":#XmlResource_loaddialogsubclass
</ins><span class="cx"> * "XmlResource#load_frame":#XmlResource_loadframe
</span><ins>+* "XmlResource#load_frame_subclass":#XmlResource_loadframesubclass
</ins><span class="cx"> * "XmlResource#load_icon":#XmlResource_loadicon
</span><span class="cx"> * "XmlResource#load_menu":#XmlResource_loadmenu
</span><span class="cx"> * &quo...
2007 Jul 04
5
loading menu using XmlResource
Hi,
i''m evaluating XmlResource: loading frame, dialogs and access widgets is ok
but i''m not able to load menu bar and menu using the corresponding methods
XmlResource#load_menu_barXmlResource#load_menui get the error saying ''XML
resource ''Opzioni'' (class ''wxMenu'') not found!'' trying to load a menu and
''XML resource
2006 Dec 02
7
Gauge Problem with XRC?
...to the external XRC file. Almost everything
seems to be fine. Only that I can never retrieve Gauge objects in the
main script. What I''ve been trying is something like this:
class MainFrame < Wx::Frame
include Wx
def initialize(parent)
super(nil,-1, "")
$xml.load_frame_subclass(self, nil, ''ID_MAINFRAME'')
@statliclabel = Window.find_window_by_name(''ID_SLABEL1'') #OK
@gauge = Window.find_window_by_name(''ID_GAUGE1'') #NG
...
Hope someone can give me a hint, or is this a bug?
Regards,
yohasebe
2005 Aug 16
9
Patch and files to add Listbook
I added the Listbook class (basically the same as the Notebook class
with some name changes). I also took the time to write a sample that
uses it. The sample interface uses XRC and is slightly more advanced
than the current XRC sample.
Sean
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
2006 Sep 06
12
Patch to wxWindow.h
This patch fixes background color problems (at least on Windows). It
uses the dreaded ''FIXME''
My plan for next weekend is to try building wxPython from the source to
see how they manage to achieve several things with SWIG that we''re not
(yet) able to. If I''m successful it might lead to wrapping a
significant portion of wxWidgets more correctly than
2004 Oct 06
11
find_window_by_xxx doesn''t find Gauge or BitmapButton
...Windows
XP, using the one-click Ruby installer and the one-click WxRuby
installer.
In the initialize() method of my Wx::Frame subclass, I have the
following code:
# Load XRC data.
xml = Wx::XmlResource.get()
xml.init_all_handlers()
xml.load("xrctest.xrc")
xml.load_frame_subclass(self, nil, "test_frame")
# Attempt to get the gauge from the XRC data by ID.
id = Wx::xrcid("test_gauge") # Returns the ID, no problem
gauge = Wx::Window.find_window_by_id(id, self) # Returns nil
Attempting to get the gauge by name has the same result:
g...
2009 Nov 28
1
'Are you sure?' custom dialog not exiting cleanly
...59 -0600
class MainFrame < Wx::Frame
attr_reader :m_statictext1, :m_butexit
def initialize(parent = nil)
super()
xml = Wx::XmlResource.get
xml.flags = 2 # Wx::XRC_NO_SUBCLASSING
xml.init_all_handlers
xml.load("sample1.xrc")
xml.load_frame_subclass(self, parent, "MyFrame1")
finder = lambda do | x |
int_id = Wx::xrcid(x)
begin
Wx::Window.find_window_by_id(int_id, self) || int_id
# Temporary hack to work around regression in 1.9.2; remove
# begin/rescue clause in...
2007 Apr 29
0
[988] branches/wxruby2/wxwidgets_282/samples/xrc/xrc_sample.rb: Explanatory note on use of default constructor with XRC
...sp  def initialize(parent)
</span><ins>+ # To load a layout defined in XRC into a Ruby subclass of Dialog,
+ # first call the empty constructor. All the details of size,
+ # title, position and so on are loaded from the XRC by the call to
+ # load_frame_subclass. Using a non-empty constructor will cause
+ # errors on GTK.
</ins><span class="cx">                 super()
</span><span class="...
2010 Jun 22
1
Stuck noobie: XRC/xrcise woes
...::Frame
attr_reader :text_box1, :upper_bt, :lower_bt, :text_box2
def initialize(parent = nil)
super()
xml = Wx::XmlResource.get
xml.flags = 2 # Wx::XRC_NO_SUBCLASSING
xml.init_all_handlers
xml.load("exercise.xrc")
xml.load_frame_subclass(self, parent, "ID_WXFRAME")
finder = lambda do | x |
int_id = Wx::xrcid(x)
begin
Wx::Window.find_window_by_id(int_id, self) || int_id
# Temporary hack to work around regression in 1.9.2;
remove
# be...
2009 Aug 10
2
xrcise -o test.rb ui.xrc
I built a small form in wxFormBuilder. In cmd i wrote
xrcise -o test.rb ui.xrc
output was
C:/ruby/lib/ruby/gems/1.9.1/gems/wx_sugar-0.1.22/lib/wx_sugar/xrc/outputter.rb:4
6:in `clean_id_attr_readers'': undefined method `each'' for
#<String:0xba5850> (No
MethodError)
from (erb):16:in `output''
from C:/ruby/lib/ruby/1.9.1/erb.rb:753:in `eval''
2007 Apr 14
0
[965] branches/wxruby2/wxwidgets_282/doc/textile: Misc.
...g-type)Window% parent, %(arg-type)String% name)
</ins><span class="cx">
</span><span class="cx"> Loads a frame.
</span><span class="cx">
</span><span class="cx"> h3(#XmlResource_loadframesubclass). XmlResource#load_frame_subclass
</span><span class="cx">
</span><del>- Boolean *load_frame_subclass*(%(arg-type)Frame% frame, %(arg-type)Window% parent, %(arg-type)String% name)
</del><ins>+ Boolean *load_frame_subclass*(%(arg-type)Frame% frame, %(arg-type)Window% parent, %(arg-typ...
2007 Nov 02
11
xrcise tutorial, undefined method ''upper_bt''
Hi
I''m trying to follow the tutorial on xrcise at
http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise
But I keep getting the following error when I try to run the example;
tutorial.rb:21:in `initialize'': undefined method ''upper_bt'' for
#<CaseChangeFrame:0x2d610f8> (NoMethodError)
from tutorial.rb:28:in `new''
from