Update of /cvsroot/fxruby/FXRuby/swig-interfaces
In directory usw-pr-cvs1:/tmp/cvs-serv31508
Modified Files:
FXWindow.i
Log Message:
FXWindow#childAtIndex now raises IndexError when the index out of bounds.
Index: FXWindow.i
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/FXWindow.i,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** FXWindow.i 19 Mar 2002 23:18:40 -0000 1.30
--- FXWindow.i 26 Mar 2002 21:38:33 -0000 1.31
***************
*** 76,79 ****
--- 76,86 ----
%exception FXWindow::FXWindow "$action FXRbRegisterRubyObj(self, result);";
+ %typemap(except) FXWindow* FXWindow::childAtIndex {
+ $action;
+ if (!$1) {
+ rb_raise(rb_eIndexError, "child window index out of bounds");
+ }
+ }
+
/// Base class for all windows
class FXWindow : public FXDrawable {
|