FOX and raise

I stumbled into something looking into FOXRuby.
I’m using PragProg 1.6.8 on Windows and I downloaded the examples for
FOXRuby, only I misplaced the icons so running any of the examples gives
something like:

imageviewer.rb:255:in raise': wrong # of arguments(2 for 0) (ArgumentError) from imageviewer.rb:255:ingetIcon’
from imageviewer.rb:20:in initialize' from imageviewer.rb:493:innew’
from imageviewer.rb:493

that 255 line is

raise RuntimeError, “Couldn’t load icon: #{filename}” #obvious isn’t it?

which should work fine.
Does FOXRuby overwrite raise or am I missing something really, really
obvious (it’s been a long night :slight_smile: ).
V.-

···

http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.

Damphyr wrote:

I stumbled into something looking into FOXRuby.
I’m using PragProg 1.6.8 on Windows and I downloaded the examples for
FOXRuby, only I misplaced the icons so running any of the examples gives
something like:

imageviewer.rb:255:in raise': wrong # of arguments(2 for 0) (ArgumentError) from imageviewer.rb:255:in getIcon’
from imageviewer.rb:20:in initialize' from imageviewer.rb:493:in new’
from imageviewer.rb:493

that 255 line is

raise RuntimeError, “Couldn’t load icon: #{filename}” #obvious isn’t it?

which should work fine.
Does FOXRuby overwrite raise or am I missing something really, really
obvious (it’s been a long night :slight_smile: ).
V.-

IIRC, FXWindow used to have a #raise method, but that was renamed to
#raiseWindow at some point, because of the conflict you found. What
version of PragProg are you using? Maybe getting a more recent one will
help…

Damphyr wrote:

I stumbled into something looking into FOXRuby.
I’m using PragProg 1.6.8 on Windows and I downloaded the examples for
FOXRuby, only I misplaced the icons so running any of the examples gives
something like:

imageviewer.rb:255:in raise': wrong # of arguments(2 for 0) (ArgumentError) from imageviewer.rb:255:in getIcon’
from imageviewer.rb:20:in initialize' from imageviewer.rb:493:in new’
from imageviewer.rb:493

that 255 line is

raise RuntimeError, “Couldn’t load icon: #{filename}” #obvious isn’t it?

which should work fine.
Does FOXRuby overwrite raise or am I missing something really, really
obvious (it’s been a long night :slight_smile: ).

FXRuby used to override raise(), but this was fixed in version 1.0.23
(see the change history at http://www.fxruby.org/doc/changes.html). The
PragProg installer for Ruby 1.6.8 bundles a pretty old version of
FXRuby; you should probably update to one of the newer FXRuby versions
for Ruby 1.6.8. See this page:

http://www.fxruby.org/web/downloads.html

for more information.