Displaying 17 results from an estimated 17 matches for "find_window_by_id".
2006 Dec 23
0
[796] trunk/wxruby2/samples/xrc/xrc_sample.rb: Simplify some method calls, rubyify and add a little more explanation
...nbsp              #
-
-                @ok = Wx::Window.find_window_by_id(Wx::xrcid(''wxID_OK''),self)
- @cancel = Wx::Window.find_window_by_id(Wx::xrcid(''wxID_CANCEL''),self)
-                @message = W...
2006 Jul 24
1
small Window.i patch
Hi
Attached a small patch to Window.i which prevents it crashing when
find_window_by_name, find_window_by_id or find_window_by_label should
return nil.
This fixes this bug (which I think was originally posted to wxruby 0.6.0)
http://rubyforge.org/tracker/index.php?func=detail&aid=634&group_id=35&atid=218
cheers
alex
_______________________________________________
wxruby-users mailing lis...
2009 Nov 28
1
'Are you sure?' custom dialog not exiting cleanly
...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 later versions
rescue RuntimeError
int_id
end
end
@m_statictext1 = finder.call("m_staticText1")...
2006 Dec 23
0
[794] trunk/wxruby2: Fix get_ruby_object so it works with SWIG tracking, move find_window_xx
...self)
</span><span class="cx"> end
</span><ins>+
+ # Recursively searches all windows below +self+ and returns the first
+ # window which has the id +an_id+. This corresponds to the find_window
+ # method method in WxWidgets when called with an integer.
+ def find_window_by_id(an_id)
+ Wx::Window.find_window_by_id(an_id, self)
+ end
+
+ # Searches all windows below +self+ and returns the first window which
+ # has the name +a_name+ This corresponds to the find_window method method
+ # in WxWidgets when called with an string.
+ def find_window_by_name(a_name)
+...
2007 Oct 09
17
Crash when using item data with a CheckListBox
Hi,
The following code works as expected with a list box.
require "wx"
class HelloWorld < Wx::App
def on_init
helloframe = Wx::Frame.new(nil, "Hello World")
choices = ["one", "two", "three", "four", "five"]
data = ["data1", "data2", "data3", "data4", "data5"]
2007 Oct 09
17
Crash when using item data with a CheckListBox
Hi,
The following code works as expected with a list box.
require "wx"
class HelloWorld < Wx::App
def on_init
helloframe = Wx::Frame.new(nil, "Hello World")
choices = ["one", "two", "three", "four", "five"]
data = ["data1", "data2", "data3", "data4", "data5"]
2008 Oct 06
2
StdDialogButtonSizer default button
Hi all,
How do i set the default button for a Wx::StdDialogButtonSizer?
Any hints would be appreciated.
regards.
bio.
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
2006 Sep 17
1
wxSashWindow.rbw
This patch includes changes to implement the SashWindow sample. Some notes:
1) You can''t resize the sash windows due to events not returning the
correct objects
2) I included a patch for EvtHandler.i even though it doesn''t affect
anything at all. I only realized after I made the change but since it
was wrong before I figured it''s better to have the right one in
2006 Sep 27
3
Window.i
Does anyone know if the XRC hand-coded methods in Window.i are still
required after my recent change to return the correct types? Also,
given that wxWindow.h is included all over the place, I think we need to
move some of that stuff out into a common .i that''s included for all
wxWindow descendants.
Roy
2004 Oct 06
11
find_window_by_xxx doesn''t find Gauge or BitmapButton
...ource.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:
gauge = Wx::Window.find_window_by_name("test_gauge", self) #
Returns nil
I''m successfully retrieving StaticText, TextCtrl, and Button controls,
but the Gauge has been really giving me gri...
2010 Jun 22
1
Stuck noobie: XRC/xrcise woes
...# 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
# begin/rescue clause in later versions
rescue RuntimeError
int_id
end
end
@text_box1 = finder.call("text_box...
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 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
2007 Apr 16
0
[969] branches/wxruby2/wxwidgets_282/doc/textile/window.txtl: Cleanup and fixing of broken links.
...t;<span class="cx"> h4. Return value
</span><span class="cx">
</span><span class="lines">@@ -604,7 +604,7 @@
</span><span class="cx">
</span><span class="cx"> h3(#Window_findwindowbyid). Window#find_window_by_id
</span><span class="cx">
</span><del>- "Window":window.html *find_window_by_id*(%(arg-type)Integer% id, %(arg-type)Window% parent = nil)
</del><ins>+ "Window":window.html *find_window_by_id*(%(arg-type)Integer% id, %(arg-type)Windo...
2007 Oct 30
3
[Weft QDA users] Using WeftQDA for Mailing-List Analysis
Hi Alex, Hi Weft-Users!
I am looking for a tool for doing a qualitative analysis of mailing-list
data. This means I have a *lot* of individual documents (the typical case:
around 500-5000 emails), belonging to the same "super-document" (a mailing
list).
I have looked at several tools and I like that Weft is public domain and
written in Ruby, so I want to figure out whether it
2007 Apr 28
6
XRC Problem
...y program is:
begin
require ''wx''
rescue LoadError => no_wx_err
begin
require ''rubygems''
require ''wx''
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 R...
2007 Apr 30
0
[997] branches/wxruby2/wxwidgets_282: Window - 2.6 -> 2.8 API, new methods and deprecations; update doc
...ss="lines">@@ -82,8 +84,8 @@
</span><span class="cx"> * "Window#find_focus":#Window_findfocus
</span><span class="cx"> * "Window#find_window":#Window_findwindow
</span><span class="cx"> * "Window#find_window_by_id":#Window_findwindowbyid
</span><ins>+* "Window#find_window_by_label":#Window_findwindowbylabel
</ins><span class="cx"> * "Window#find_window_by_name":#Window_findwindowbyname
</span><del>-* "Window#find_window_by_label"...