[fxruby-users] [Q] Proposed FXRuby 1.2 Feature Name Change

Jordan, Tom Tom.Jordan at camtronics.com
Thu Jul 29 13:32:04 EDT 2004

It's a shame that ruby doesn't provide a

require_version 'fox' '1.2'


That way you could "pin" your app to a specific
version of the module you want and if it wasn't
available to take appropriate action to warn/other.

Maybe even extend it to get a code block on


require_version 'fox' '1.0' { |e|
	puts "Fox version 1.0 required."


require_version 'fox' '1.2' { |e|
	# limp mode: redefines/overrides/mappings

-- Tom. 

> -----Original Message-----
> From: fxruby-users-bounces at rubyforge.org 
> [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Lyle Johnson
> Sent: Tuesday, July 27, 2004 9:21 PM
> To: fxruby-users at rubyforge.org
> Subject: [fxruby-users] [Q] Proposed FXRuby 1.2 Feature Name Change
> All,
> I am strongly considering changing the feature name -- that is, the 
> string that you pass to the require() method -- from "fox" to "fox12" 
> for FXRuby version 1.2. I'd like to hear any comments for and against 
> such a change.
> There are at least a couple of reasons for the change. One reason has 
> to do with the RubyGems "stub library" feature. If you've been 
> experimenting with the first few alpha releases of FXRuby 1.2, 
> specifically the gems-based packages, you know that I've been 
> recommending this pattern for loading FXRuby:
> 	require 'rubygems'
> 	require_gem 'fxruby'
> Well, as it turns out, RubyGems also installs what they call a "stub 
> library" in the standard Ruby load path, so that you can simply do 
> this:
> 	require 'fox'
> and it invokes the magic to load the gem instead. This is, generally 
> speaking, a nice idea and provides some measure of 
> backwards-compatibility for legacy (i.e. pre-RubyGems) code 
> that didn't 
> know to use require_gem. But what in means for FXRuby is that 
> you can't 
> really have both FXRuby 1.0 and the gem for FXRuby 1.2 installed 
> simultaneously; if you do, then:
> 	require 'fox'
> will always load FXRuby 1.2 and never "see" your FXRuby 1.0 
> installation. Not a good thing. If on the other hand we change the 
> feature name for FXRuby 1.2 from "fox" to "fox12", RubyGems will 
> install a stub library called "fox12.rb", which won't clash 
> with older 
> FXRuby 1.0 installations that used the "fox" feature name.
> But perhaps the more compelling reason for a name change at 
> this point 
> is that the APIs for FXRuby versions 1.0 and 1.2 are so different. 
> Unless you get incredibly lucky, it's unlikely that a program written 
> against the FXRuby 1.0 API is going to work out of the box when run 
> with FXRuby 1.2. And it will be disastrous, in terms of support, if 
> application developers have this variable floating around, i.e. when 
> they say require 'fox', is it going to load up version 1.0 or 1.2?
> So there you go. If this change goes through, I'm 
> specifically thinking 
> that (1) the gem name will change from "fxruby" to 
> "fxruby12"; and, (2) 
> the feature name will change from "fox" to "fox12". If you have an 
> application or library based on FXRuby 1.0, and don't wish to port it 
> to FXRuby 1.2 anytime soon, there will be less pressure to do 
> so since 
> both versions would be able to peacefully co-exist.
> I don't intend to change the module name from "Fox", because 
> you can't 
> use both versions simultaneously within the same application 
> and hence 
> there should be no opportunity for namespace clashes.
> OK, I think that's all I wanted to say to get the ball rolling. Now 
> please shoot holes in my plan. ;)
> Thanks,
> Lyle
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004


Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004

This e-mail or the documents accompanying this e-mail contain
information that may be confidential and/or privileged. It may
also be prohibited from disclosure under applicable law. The
information is intended to be for the use of the individual or
entity named on this transmission. If you are not the intended
recipient, be aware that any disclosure, copying, distribution
or use of the contents of this information is without
authorization and is prohibited. If you have received this
e-mail in error, please notify us immediately so that we can
take action to correct the problem.

More information about the fxruby-users mailing list