[fxruby-users] setCurrent switcher index out of bounds problem

Axel Etzold AEtzold at gmx.de
Wed Jun 7 10:38:43 EDT 2006

Dear Meinrad,
Dear Lyle,

thank you for your responses.
Meinrad: my problem was not so much to identify
an error line number, but to get some grasp
of what constant actually does what in FXRuby.
This generates a lot of silly questions to more
experienced people, of course. Sorry for that.

So I find that in any learning process, 
redundancy is a good thing. It may be very
nice to have one example for each particular
behaviour FXRuby offers, but if you're learning it,
this may not be enough to disambiguate the
silly things one thinks a program does from
those that actually happen.
I am just starting FXRuby now, but I use
Ruby for command-line things for a longer
period of time. It is the first language
I feel I can talk about serious things to a computer -
otherwise, in university maths studies, you may well
 acquire computer knowledge like other people learn
Old Greek or Sanskrit: not much practical
use in today's Greece or India ...
So I'd suggest to you FXRuby experts to write a
book like Hal Fulton's The Ruby Way - plenty of
code for disambiguation ... . There really may
be a need for it, as amazon doesn't show me any
book entirely about FOX or FXRuby. (I know of
Ruby Developer's guide, but here FXRuby is one
of many topics.)

Then again, I've got another question I couldn't find
an answer to :
In one field of an FX4Splitter, I want to display a PNG
I know how to do this (basically) from the imageviewer.rb
But the image I display needs to be generated first
(by Gnuplot ... no problem to output PNG from there,
except one: to set the size : I don't know what
to tell Gnuplot there:
- how do I see what the size of that

 @imageview_rec = FXImageView.new(@topFrame_rec, nil, nil, 0,

is ?
I tried   
    p @imageview_rec.getHeight
    p @imageview_rec.getWidth

but that gives me 1 and 1.

Thank you and sorry for my annoying questions,

Best regards,


> -------- Original-Nachricht --------
> Datum: 6 Jun 2006 14:02:09 -0000
> Von: "lyle at knology.net" <lyle at knology.net>
> An: fxruby-users at rubyforge.org
> Betreff: Re: [fxruby-users] setCurrent switcher index out of bounds problem
> &#xA> On Tue, 06 Jun 2006 09:49:56 +0200, Axel Etzold <AEtzold at gmx.de> wrote :
> > Now, I need to add the possibility to switch between
> > different layers of the right pane, just like in the
> > shutter.rb application, where you press one of the
> > ShutterButtons on the left to have that behaviour.
> OK.
> > Then, I get the error below.
> > What is the problem here ?
> Looking at your code example, I don't see where you're actually adding any
> content to the switcher. It's empty, so when you tell it to switch to a
> different page (by setting @switcher.current to a new value) you're
> getting
> an error.
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

More information about the fxruby-users mailing list