[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:04158] Getting Tk to work on Windows

From: "Michael Neumann" <neumann@...>
Date: 2000-07-21 11:59:46 UTC
List: ruby-talk #4158
Hi....

Because some people have problems getting Tk to work on Windows, I have two
proposals:

1) In rbcw145.zip (precompiled ruby for cygwin) the tcltklib80.dll is
missing.
     All the other version (7.6, 8.1, 8.2, 8.3) are included.
     Could 8.0 (tcltklib80.dll) be included in the next release 1.4.6 ?

2) If the environment-variable "TCL_LIBRARY" is not set, "lib/tcltklib.rb"
do not find the right version
    and so TclTk don't work.
    Perhaps "lib/tcltklib.rb" could be change to the below one (or something
similar), which tries to load
    one version after the other (if TCL_LIBRARY is not set) until the right
one was found. If not it raises
    an error.


#
# tcltklib.rb
#
case ENV['TCL_LIBRARY']
when /8\.(\d)/
  require 'tcltklib8' + $1
when /7\.6/
  require 'tcltklib76'
else
  versions = ["80", "81", "82", "83", "76"]
  sucess = false
  begin
    v = versions.shift
    if v != nil then
      puts "try: tcltklib#{v}" if $DEBUG
      require "tcltklib" + v
      success = true
    end
  rescue
    retry
  end

  if not success then
    raise "Could not load tcltklibXX"
  end
end
################# END ################


--
Michael



In This Thread

Prev Next