[fxruby-users] Two questions...

lyle at knology.net lyle at knology.net
Mon Aug 29 12:36:46 EDT 2005

On Mon, 29 Aug 2005 10:54:21 -0300, Gonzalo Garramuno
<ggarra at advancedsl.com.ar> wrote :

> 1) In my GUI, I have dialog boxes that have groups of widgets that I want
to create once and hide/show depending on some conditions.  The problem I am
running into, is that fox/fxruby's packer seems to be unaware of hide/show
and it does not recalculate the window to fit the visible widgets
appropiately.  This results in windows that are either too wide or too
small.  FOX only seems to recalculate the layout if I do any of the following:
> a) Move the window.
> b) Call a dummy resize (but this also changes focus).
> I've tried to call layout() and recalc() but this does not work.  Thus...
the question is... how do I get Fox to update the layout of a window if I
hide/unhide some frames without changing window focus?

Do I understand that you want the entire dialog box's dimensions to grow (or
shrink) to fit the visible contents? If so, I'm pretty sure that that will
require a call to resize() on the dialog box itself, e.g.

  dialogBox.resize(dialogBox.defaultWidth, dialogBox.defaultHeight)

Are you saying that this causes the window to lose focus?

> 2) FXRuby versioning.  Is there a particular reason why each main fxruby
release is given a new name for its require (we've had fox, fox12 and fox14
so far)?  While I understand that there may be incompatabilities between
releases, this sort of naming convention kind of goes against the grain of
rubygems, where versioning is to be handled automatically upon require (not
to mention it is a pain in the neck to have to change your code with each
fox release, even if the new release didn't change substantially the api). 
Could I suggest that with fox1.4 on, we revert back to just "require 'fox'"
and let rubygems (or users' ruby include path) handle the versioning?

If everyone were using RubyGems, you're correct that it would be appropriate
to let the application dictate which version of FXRuby to require. The fact
of the matter, however, is that a lot of people are *not* using FXRuby as a
gem -- for proof, just look at the download statistics for the different
packagings of FXRuby 1.2.6.

Given the reality that a majority of people aren't using gems yet, and that
(as you already noted) there are often a number of incompatibilities between
major releases of FXRuby, I think it makes more sense to stick with the
established versioning approach.

More information about the fxruby-users mailing list