wxruby3 0.9.0.pre.beta.10-x64-mingw-ucrt → 0.9.0.pre.beta.11-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/ext/wxbase32u_gcc_custom.dll +0 -0
  3. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  4. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  5. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  6. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  7. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  8. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  9. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  10. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  11. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  12. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  13. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  14. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  17. data/lib/wx/core/data_object.rb +74 -6
  18. data/lib/wx/core/point.rb +21 -10
  19. data/lib/wx/core/real_point.rb +21 -10
  20. data/lib/wx/core/rect.rb +2 -2
  21. data/lib/wx/core/size.rb +12 -5
  22. data/lib/wx/doc/data_object.rb +104 -0
  23. data/lib/wx/doc/gdi_common.rb +33 -5
  24. data/lib/wx/doc/gen/core.rb +2 -2
  25. data/lib/wx/doc/gen/data_object.rb +0 -20
  26. data/lib/wx/doc/gen/data_object_simple_base.rb +10 -0
  27. data/lib/wx/doc/gen/scaled_dc.rb +10 -0
  28. data/lib/wx/doc/scaled_dc.rb +16 -0
  29. data/lib/wx/global_const.rb +4 -3
  30. data/lib/wx/version.rb +1 -1
  31. data/lib/wxruby_aui.so +0 -0
  32. data/lib/wxruby_core.so +0 -0
  33. data/lib/wxruby_grid.so +0 -0
  34. data/lib/wxruby_html.so +0 -0
  35. data/lib/wxruby_pg.so +0 -0
  36. data/lib/wxruby_prt.so +0 -0
  37. data/lib/wxruby_rbn.so +0 -0
  38. data/lib/wxruby_rtc.so +0 -0
  39. data/lib/wxruby_stc.so +0 -0
  40. data/tests/lib/wxapp_runner.rb +64 -0
  41. data/tests/test_basic.rb +0 -5
  42. data/tests/test_clipboard.rb +114 -17
  43. data/tests/test_dialog.rb +2 -13
  44. data/tests/test_event_handling.rb +2 -13
  45. data/tests/test_events.rb +2 -6
  46. data/tests/test_geometry.rb +54 -17
  47. data/tests/test_intl.rb +2 -15
  48. data/tests/test_item_data.rb +2 -15
  49. data/tests/test_variant.rb +1 -15
  50. data/tests/testapp.rb +0 -5
  51. data/tests/testapp_noframe.rb +0 -5
  52. metadata +12 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f6e7941faf953aaccbdd3190c6620f078e864099d452047cf549275a288bf89
4
- data.tar.gz: ff440fc245055bd4ea02623335c4c00068b808b2c2a1314761f3c8f9a8486cbc
3
+ metadata.gz: 21e4dd4492cc5886ff3b6a3479a98aeb4de31836504fccbe95573b62b46733c4
4
+ data.tar.gz: 1348defec7496457813b29e61149c7ec9662aebc9b958f4faabaa6961f194d84
5
5
  SHA512:
6
- metadata.gz: c25bfc9999b42bd5cf1c4e80ac332b1d31c67882a725f6959acbe256d4c64be468fde151149e9d4ee58937e4f27e0d644332d9c8c83d85387b144c63a6ac457d
7
- data.tar.gz: 074ee9e7abd96662182e4f86f792c319e49f7e5f108ca63404bba97c7d2b6d938e8520c1a315568ba34e0ace84d34949da5a65bfd457c0a1af1a391a559e238d
6
+ metadata.gz: 27d3fb31968f3d657c2c6199750250331b103f48c5e3d7a6908e302b51ab9ae616e9434fbbc25241335d0791527e07f4354bb59a65da322ac66d85c69b0b42ee
7
+ data.tar.gz: e8adac23ee31c8a447228bdf2e11c87aa4aaa93d7af30450bc17ff57e620d2cbd885a8979ba82e6fdf6b21e87656846a25456a0a5a7c5a87faced833f0c5df5f
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,10 +1,78 @@
1
- # Provide some default implementations of these to make life easier
2
- class Wx::DataObject
3
- def get_preferred_format(direction)
4
- get_all_formats(direction).first
1
+
2
+ module Wx
3
+
4
+ # Provide some default implementations of these to make life easier
5
+ class DataObject
6
+ def get_preferred_format(direction)
7
+ get_all_formats(direction).first
8
+ end
9
+
10
+ def get_format_count(direction)
11
+ get_all_formats(direction).size
12
+ end
5
13
  end
6
14
 
7
- def get_format_count(direction)
8
- get_all_formats(direction).size
15
+ class DataObjectSimple
16
+
17
+ # implement the overloads which do not require the format arg
18
+ # using pure Ruby
19
+
20
+ wx_get_data_size = instance_method :get_data_size
21
+ define_method :get_data_size do |format = nil|
22
+ wx_get_data_size.bind(self).call(format || self.get_format)
23
+ end
24
+
25
+ wx_get_data_here = instance_method :get_data_here
26
+ define_method :get_data_here do |format = nil|
27
+ wx_get_data_here.bind(self).call(format || self.get_format)
28
+ end
29
+
30
+ wx_set_data = instance_method :set_data
31
+ define_method :set_data do |*args|
32
+ if args.size>1
33
+ format, buf = args
34
+ else
35
+ format = nil
36
+ buf = args.first
37
+ end
38
+ wx_set_data.bind(self).call(format || self.get_format, buf)
39
+ end
40
+
9
41
  end
42
+
43
+ class DataObjectSimpleBase
44
+
45
+ # implement these in pure Ruby for optimization
46
+ def get_data_size(*)
47
+ self._get_data_size
48
+ end
49
+ def get_data_here(*)
50
+ self._get_data
51
+ end
52
+
53
+ def set_data(*args)
54
+ if args.size>1
55
+ _, buf = args
56
+ else
57
+ buf = args.first
58
+ end
59
+ self._set_data(buf)
60
+ end
61
+
62
+ def _get_data_size
63
+ (_get_data || '').bytesize
64
+ end
65
+ protected :_get_data_size
66
+
67
+ end
68
+
69
+ class TextDataObject
70
+
71
+ # override this to loose the extra terminating 0 we otherwise get
72
+ def get_data_here(*)
73
+ self.get_text
74
+ end
75
+
76
+ end
77
+
10
78
  end
data/lib/wx/core/point.rb CHANGED
@@ -1,4 +1,7 @@
1
1
  class Wx::Point
2
+
3
+ include Comparable
4
+
2
5
  # More informative output when converted to string
3
6
  def to_s
4
7
  "#<Wx::Point: (#{x}, #{y})>"
@@ -16,23 +19,26 @@ class Wx::Point
16
19
  alias :get_x :x
17
20
  alias :get_y :y
18
21
 
19
- # Compare point values
20
- def ==(other)
21
- if Wx::Point === other
22
+ # Correct comparison for Points - same if same x and y
23
+ def eql?(other)
24
+ if other.instance_of?(self.class)
22
25
  x == other.x and y == other.y
23
- elsif Array === other && other.size == 2
24
- to_ary == other
25
26
  else
26
- Kernel.raise TypeError, "Cannot compare Point to #{other}"
27
+ false
27
28
  end
28
29
  end
29
30
 
30
- # Correct comparison for Points - same if same x and y
31
- def eql?(other)
31
+ def hash
32
+ to_ary.hash
33
+ end
34
+
35
+ def <=>(other)
32
36
  if Wx::Point === other
33
- x == other.x and y == other.y
37
+ (x*y) <=> (other.x*other.y)
38
+ elsif Array === other && other.size == 2
39
+ (x*y) <=> (other.first.to_i*other.last.to_i)
34
40
  else
35
- false
41
+ nil
36
42
  end
37
43
  end
38
44
 
@@ -89,4 +95,9 @@ class Wx::Point
89
95
  end
90
96
  end
91
97
  end
98
+
99
+ def to_real_point
100
+ Wx::RealPoint.new(self.x.to_f, self.y.to_f)
101
+ end
102
+ alias :to_real :to_real_point
92
103
  end
@@ -1,4 +1,7 @@
1
1
  class Wx::RealPoint
2
+
3
+ include Comparable
4
+
2
5
  # More informative output when converted to string
3
6
  def to_s
4
7
  "#<Wx::RealPoint: (#{x}, #{y})>"
@@ -16,23 +19,26 @@ class Wx::RealPoint
16
19
  alias :get_x :x
17
20
  alias :get_y :y
18
21
 
19
- # Compare point values
20
- def ==(other)
21
- if Wx::RealPoint === other
22
+ # Correct comparison for RealPoints - same if same x and y
23
+ def eql?(other)
24
+ if other.instance_of?(self.class)
22
25
  x == other.x and y == other.y
23
- elsif Array === other && other.size == 2
24
- to_ary == other
25
26
  else
26
- Kernel.raise TypeError, "Cannot compare RealPoint to #{other}"
27
+ false
27
28
  end
28
29
  end
29
30
 
30
- # Correct comparison for RealPoints - same if same x and y
31
- def eql?(other)
31
+ def hash
32
+ to_ary.hash
33
+ end
34
+
35
+ def <=>(other)
32
36
  if Wx::RealPoint === other
33
- x == other.x and y == other.y
37
+ (x*y) <=> (other.x*other.y)
38
+ elsif Array === other && other.size == 2
39
+ (x*y) <=> (other.first.to_f*other.last.to_f)
34
40
  else
35
- false
41
+ nil
36
42
  end
37
43
  end
38
44
 
@@ -89,4 +95,9 @@ class Wx::RealPoint
89
95
  end
90
96
  end
91
97
  end
98
+
99
+
100
+ def to_point
101
+ Wx::Point.new(self.x.to_i, self.y.to_i)
102
+ end
92
103
  end
data/lib/wx/core/rect.rb CHANGED
@@ -23,12 +23,12 @@ class Wx::Rect
23
23
  elsif Array === other && other.size == 4
24
24
  to_ary == other
25
25
  else
26
- Kernel.raise TypeError, "Cannot compare Rect to #{other}"
26
+ false
27
27
  end
28
28
  end
29
29
 
30
30
  def eql?(other)
31
- if Wx::Rect === other
31
+ if other.instance_of?(self.class)
32
32
  left == other.left and top == other.top and
33
33
  width == other.width and height == other.height
34
34
  else
data/lib/wx/core/size.rb CHANGED
@@ -1,4 +1,7 @@
1
1
  class Wx::Size
2
+
3
+ include Comparable
4
+
2
5
  # More informative output for inspect etc
3
6
  def to_s
4
7
  "#<Wx::Size: #{width}x#{height}>"
@@ -14,24 +17,28 @@ class Wx::Size
14
17
  end
15
18
 
16
19
  # Compare with another size value
17
- def ==(other)
20
+ def <=>(other)
18
21
  if Wx::Size === other
19
- width == other.width and height == other.height
22
+ (width*height) <=> (other.width*other.height)
20
23
  elsif Array === other and other.size == 2
21
- to_ary == other
24
+ (width*height) <=> (other.first*other.last)
22
25
  else
23
- Kernel.raise TypeError, "Cannot compare Size to #{other}"
26
+ nil
24
27
  end
25
28
  end
26
29
 
27
30
  def eql?(other)
28
- if Wx::Size === other
31
+ if other.instance_of?(self.class)
29
32
  width == other.width and height == other.height
30
33
  else
31
34
  false
32
35
  end
33
36
  end
34
37
 
38
+ def hash
39
+ to_ary.hash
40
+ end
41
+
35
42
  # Return a new Wx::Size with the width and height values both divided
36
43
  # by parameter +num+, which should be a Numeric
37
44
  def /(num)
@@ -0,0 +1,104 @@
1
+
2
+ module Wx
3
+
4
+ class DataObject
5
+
6
+ # Returns the data size of the given format.
7
+ # Should be overridden in derived classes.
8
+ # @note **IMPORTANT** Please note that it is necessary to return the **size in bytes** of the data string
9
+ # returned by #get_data_here (not the size in characters).
10
+ # @param format [Wx::DataFormat]
11
+ # @return [Integer]
12
+ def get_data_size(format) end
13
+ alias_method :data_size, :get_data_size
14
+
15
+ end
16
+
17
+ # This is an (abstract in Ruby) base class for the simplest possible custom data objects.
18
+ # Unlike in C++ in Ruby this class cannot be used to derive custom data objects from but
19
+ # instead {Wx::DataObjectSimpleBase} (derived from Wx::DataObjectSimple) should be used.
20
+ # The data object of (a class derived from) this class only supports <b>one format</b>,
21
+ # so the number of virtual functions to be implemented is reduced.
22
+ # This class is the base class for {Wx::TextDataObject}, {Wx::FileDataObject}, {Wx::BitmapDataObject},
23
+ # {Wx::wxCustomDataObject} and others.
24
+ # ===
25
+ #
26
+ # Category: Clipboard and Drag & Drop
27
+ # @see Drag and Drop Overview
28
+ # @see Drag & Drop Sample
29
+ class DataObjectSimple < DataObject
30
+
31
+ # @overload get_data_size(format)
32
+ # Returns the data size of the format for this object.
33
+ # @param [Wx::DataFormat] format ignored for this class
34
+ # @return [Integer] default always returns 0
35
+ # @overload get_data_size()
36
+ # Returns the data size of the format for this object.
37
+ # @return [Integer] default always returns 0
38
+ def get_data_size(*) end
39
+
40
+ # @overload get_data_here(format)
41
+ # Returns the data of this object.
42
+ # @param [Wx::DataFormat] format ignored for this class
43
+ # @return [String,nil] data of this object
44
+ # @overload get_data_here()
45
+ # Returns the data of this object.
46
+ # @return [String,nil] data of this object
47
+ def get_data_here(*) end
48
+
49
+ # @overload set_data(format, buf)
50
+ # Sets the data for this object and returns true if successful, false otherwise.
51
+ # @param [Wx::DataFormat] format ignored for this class
52
+ # @param [String] buf non-nil data
53
+ # @return [Boolean] default always returns false.
54
+ # @overload set_data(buf)
55
+ # Sets the data for this object and returns true if successful, false otherwise.
56
+ # @param [String] buf non-nil data
57
+ # @return [Boolean] default always returns false.
58
+ def set_data(*) end
59
+
60
+ end
61
+
62
+ # This is the base class for the simplest possible custom data objects.
63
+ # The data object of (a class derived from) this class only supports <b>one format</b>,
64
+ # so the number of methods to be implemented is reduced.
65
+ # To be useful it must be derived. Derived objects supporting rendering the data must
66
+ # override {Wx::DataObjectSimpleBase#_get_data_size} and {Wx::DataObjectSimpleBase#_get_data}.
67
+ # By default these methods respectively return <code>0</code> and <code>nil</code>.
68
+ # The objects which may be set must override {Wx::DataObjectSimpleBase#_set_data} (which
69
+ # returns <code>false</code>).
70
+ # Of course, the objects supporting both operations must override all three methods.
71
+ # ===
72
+ #
73
+ # Category: Clipboard and Drag & Drop
74
+ # @see Drag and Drop Overview
75
+ # @see Drag & Drop Sample
76
+ # @see Wx::DataObjectSimple
77
+ class DataObjectSimpleBase < DataObjectSimple
78
+
79
+ # Returns this object's data size.
80
+ # The default implementation calls #_get_data and determines the size of the returned data string (if any).
81
+ # As this is not very optimal for more complex (and larger data objects) very often this method will be
82
+ # overridden in derived classes.
83
+ # @note **IMPORTANT** Please note that it is necessary to return the **size in bytes** of the data string
84
+ # returned by #_get_data (not the size in characters).
85
+ # @return [Integer]
86
+ def _get_data_size; end
87
+ protected :_get_data_size
88
+
89
+ # Returns this object's data (default implementation returns nil).
90
+ # Should be overridden in derived classes.
91
+ # @return [String,nil]
92
+ def _get_data; end
93
+ protected :_get_data
94
+
95
+ # Sets this object's data (default implementation does nothing and returns false).
96
+ # Should be overridden in derived classes.
97
+ # @param [String] buf non-nil data
98
+ # @return [Boolean]
99
+ def _set_data(buf); end
100
+ protected :_set_data
101
+
102
+ end
103
+
104
+ end
@@ -56,20 +56,27 @@ module Wx
56
56
 
57
57
  class Point
58
58
 
59
+ include Comparable
60
+
59
61
  # Returns point array (`[x, y]`)
60
62
  # @return [Array(Integer,Integer)] point as array
61
63
  def to_ary; end
62
64
 
63
- # Compare point values (Wx::Point or point array). Throws exception if incompatible.
65
+ # Compare point values (Wx::Point or point array). Returns -1,0 or 1 to indicate if this point
66
+ # is smaller, equal or greater than other (comparing <code>x*y</code> with <code>other.x*other.y</code>).
67
+ # Returns nil if incompatible.
64
68
  # @param [Wx::Point,Array(Integer,Integer)] other
65
- # @return [Boolean]
66
- def ==(other)end
69
+ # @return [Boolean,nil]
70
+ def <=>(other)end
67
71
 
68
72
  # Compare points.
69
73
  # @param [Wx::Point] other
70
74
  # @return [Boolean]
71
75
  def eql?(other)end
72
76
 
77
+ # Returns hash for point
78
+ def hash; end
79
+
73
80
  # Return a new Wx::Point with the x and y parameters both divided by
74
81
  # parameter +num+, which should be a Numeric
75
82
  # @param [Numeric] num
@@ -97,11 +104,18 @@ module Wx
97
104
  # @param [Wx::Point,Wx::Size,Array(Integer,Integer),Numeric] arg
98
105
  # @return [Wx::Point]
99
106
  def +(arg) end
100
-
107
+
108
+ # Converts point to Wx::RealPoint
109
+ # @return [Wx::RealPoint] Wx::RealPoint instance from point coordinates
110
+ def to_real_point; end
111
+ alias :to_real :to_real_point
112
+
101
113
  end
102
114
 
103
115
  class RealPoint
104
116
 
117
+ include Comparable
118
+
105
119
  # Returns point array (`[x, y]`)
106
120
  # @return [Array(Float,Float)] point as array
107
121
  def to_ary; end
@@ -111,11 +125,21 @@ module Wx
111
125
  # @return [Boolean]
112
126
  def ==(other)end
113
127
 
128
+ # Compare point values (Wx::RealPoint or point array). Returns -1,0 or 1 to indicate if this point
129
+ # is smaller, equal or greater than other (comparing <code>x*y</code> with <code>other.x*other.y</code>).
130
+ # Returns nil if incompatible.
131
+ # @param [Wx::RealPoint,Array(Float,Float)] other
132
+ # @return [Boolean,nil]
133
+ def <=>(other)end
134
+
114
135
  # Compare points.
115
136
  # @param [Wx::RealPoint] other
116
137
  # @return [Boolean]
117
138
  def eql?(other)end
118
139
 
140
+ # Returns hash for point
141
+ def hash; end
142
+
119
143
  # Return a new Wx::RealPoint with the x and y parameters both divided by
120
144
  # parameter +num+, which should be a Numeric
121
145
  # @param [Numeric] num
@@ -144,6 +168,10 @@ module Wx
144
168
  # @return [Wx::RealPoint]
145
169
  def +(arg) end
146
170
 
171
+ # Converts real point to Wx::Point
172
+ # @return [Wx::Point] Wx::Point instance from real point coordinates
173
+ def to_point; end
174
+
147
175
  end
148
176
 
149
177
  class Rect
@@ -152,7 +180,7 @@ module Wx
152
180
  # @return [Array(Integer,Integer,Integer,Integer)] rect as array
153
181
  def to_ary; end
154
182
 
155
- # Compare area values (Wx::Rect or 4-element array). Throws exception if incompatible.
183
+ # Compare area values (Wx::Rect or 4-element array). Returns false if incompatible.
156
184
  # @param [Wx::Rect,Array(Integer,Integer,Integer,Integer)] other
157
185
  # @return [Boolean]
158
186
  def ==(other)end
@@ -7,10 +7,10 @@
7
7
  module Wx
8
8
 
9
9
  # wxRuby version string
10
- Wx::WXRUBY_VERSION = '0.9.0-beta.10'
10
+ Wx::WXRUBY_VERSION = '0.9.0-beta.11'
11
11
 
12
12
  # wxRuby version release type (alpha, beta, rc)
13
- Wx::WXRUBY_RELEASE_TYPE = 'beta.10'
13
+ Wx::WXRUBY_RELEASE_TYPE = 'beta.11'
14
14
  # wxRuby major version number
15
15
  Wx::WXRUBY_MAJOR = 0
16
16
  # wxRuby minor version number
@@ -85,12 +85,6 @@ module Wx
85
85
  def get_data_here(format) end
86
86
  alias_method :data_here, :get_data_here
87
87
 
88
- # Returns the data size of the given format format.
89
- # @param format [Wx::DataFormat]
90
- # @return [Integer]
91
- def get_data_size(format) end
92
- alias_method :data_size, :get_data_size
93
-
94
88
  # Returns the number of available formats for rendering or setting the data.
95
89
  # @param dir [Direction]
96
90
  # @return [Integer]
@@ -122,20 +116,6 @@ module Wx
122
116
 
123
117
  end # DataObject
124
118
 
125
- # This is the simplest possible implementation of the {Wx::DataObject} class.
126
- # The data object of (a class derived from) this class only supports <b>one format</b>, so the number of virtual functions to be implemented is reduced.
127
- # Notice that this is still an abstract base class and cannot be used directly, it must be derived. The objects supporting rendering the data must override {Wx::DataObjectSimple#get_data_size} and {Wx::DataObjectSimple#get_data_here} while the objects which may be set must override {Wx::DataObjectSimple#set_data}. Of course, the objects supporting both operations must override all three methods.
128
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl}, you need to derive your data object class from Wx::PlDataObjectSimple.
129
- # ===
130
- #
131
- # Category: Clipboard and Drag & Drop
132
- # @see Drag and Drop Overview
133
- # @see Drag & Drop Sample
134
- # @see Wx::FileDataObject
135
- # @see Wx::TextDataObject
136
- # @see Wx::BitmapDataObject
137
- #
138
- #
139
119
  class DataObjectSimple < DataObject
140
120
 
141
121
  # Constructor accepts the supported format (none by default) which may also be set later with {Wx::DataObjectSimple#set_format}.
@@ -0,0 +1,10 @@
1
+ # :stopdoc:
2
+ # This file is automatically generated by the WXRuby3 documentation
3
+ # generator. Do not alter this file.
4
+ # :startdoc:
5
+
6
+
7
+ module Wx
8
+
9
+
10
+ end
@@ -0,0 +1,10 @@
1
+ # :stopdoc:
2
+ # This file is automatically generated by the WXRuby3 documentation
3
+ # generator. Do not alter this file.
4
+ # :startdoc:
5
+
6
+
7
+ module Wx
8
+
9
+
10
+ end
@@ -0,0 +1,16 @@
1
+
2
+ class Wx
3
+
4
+ class ScaledDC < Wx::DC
5
+
6
+ private :initialize
7
+
8
+ # Creates a Wx::ScaledDC instance for target and scale and
9
+ # passes the instance to the given block to draw on.
10
+ # @param [Wx::DC] target DC to draw on (scaled)
11
+ # @param [Float] scale scale factor
12
+ # @yieldparam [Wx::ScaledDC] dc scaled dc to draw on
13
+ def self.draw_on(target, scale) end
14
+ end
15
+
16
+ end
@@ -4,7 +4,7 @@
4
4
  module WxGlobalConstants
5
5
 
6
6
  class << self
7
- def search_nested(mod, sym)
7
+ def search_nested(mod, sym, path = [])
8
8
  # check any nested modules and/or (enum) classes
9
9
  const_val = nil
10
10
  mod.constants.each do |c|
@@ -16,11 +16,12 @@ module WxGlobalConstants
16
16
  elsif cv.name.start_with?('Wx::') # only search Wx namespace
17
17
  # prevent const_missing being triggered here since that may lead to unexpected results
18
18
  const_val = cv.const_get(sym) if cv.constants.include?(sym)
19
- const_val = search_nested(cv, sym) unless const_val
19
+ const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
20
20
  end
21
21
  when ::Module
22
22
  if cv.name.start_with?('Wx::') # only search Wx namespace
23
- const_val = cv.const_get(sym) rescue nil
23
+ const_val = cv.const_get(sym) if cv.constants.include?(sym)
24
+ const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
24
25
  end
25
26
  end unless mod == cv # watch out for infinite recursion
26
27
  break if const_val
data/lib/wx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wx
2
- WXRUBY_VERSION = '0.9.0-beta.10'
2
+ WXRUBY_VERSION = '0.9.0-beta.11'
3
3
  end
data/lib/wxruby_aui.so CHANGED
Binary file
data/lib/wxruby_core.so CHANGED
Binary file
data/lib/wxruby_grid.so CHANGED
Binary file
data/lib/wxruby_html.so CHANGED
Binary file
data/lib/wxruby_pg.so CHANGED
Binary file
data/lib/wxruby_prt.so CHANGED
Binary file
data/lib/wxruby_rbn.so CHANGED
Binary file
data/lib/wxruby_rtc.so CHANGED
Binary file
data/lib/wxruby_stc.so CHANGED
Binary file