Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #2345

Re: Tk and Tile with Tk8.5

From Albert Schlef <albertschlef@gmail.com>
Newsgroups comp.lang.ruby
Subject Re: Tk and Tile with Tk8.5
Date 2011-04-05 09:13 -0500
Organization Service de news de lacave.net
Message-ID <556a229f4b3527c589df7da1a9695e2f@ruby-forum.com> (permalink)
References <07a7e2ba2709d9e19d380257946e93e6@ruby-forum.com> <c764e2404317aaffc33a263308b40263@ruby-forum.com> <fa24aa47c77b093188147e2ac0fd3973@ruby-forum.com> <9fc745ebe20dd2e019f14c70fe9da7c4@ruby-forum.com> <20110405.071609.74742611.nagai@ai.kyutech.ac.jp>

Show all headers | View raw


Hidetoshi NAGAI wrote in post #990904:
> The following depend on an unofficial feature of ruby's dll loading.
> At present, it will work. But I don't recomment it.
> [...]
> (2) Create loader script "tcltklib.rb" at ruby's library directory
>    (.e.g /usr/lib/ruby/1.8).
>    For example,
>    ----- tcltklib.rb -----------------------------------------
>    ver = ENV['RUBYTK_VERSION']
>    if ver && !ver.empty?
>      require "tcltklib.#{ver}.so"
>    else
>      require "tcltklib.so"
>    end

Hey, that's a nice trick. Thanks!

> The following depend on an unofficial feature of ruby's dll loading.
> At present, it will work. But I don't recomment it.

BTW, what's here isn't an official feature? I do "ri Kernel#require" and 
(I think) it describes everything needed to make this work: Ruby first 
looks for an .rb file (this enables us to inject our loader script), and 
then it's possible to explicitly load a .so (or .dll). So why isn't your 
trick future-proof?

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Tk and Tile with Tk8.5 László Földes <foldes.laszlo2@gmail.com> - 2011-04-01 19:45 -0500
  Re: Tk and Tile with Tk8.5 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-04-01 22:39 -0500
    Re: Tk and Tile with Tk8.5 László Földes <foldes.laszlo2@gmail.com> - 2011-04-02 16:38 -0500
      Re: Tk and Tile with Tk8.5 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-04-02 18:57 -0500
  Re: Tk and Tile with Tk8.5 Albert Schlef <albertschlef@gmail.com> - 2011-04-02 21:30 -0500
    Re: Tk and Tile with Tk8.5 László Földes <foldes.laszlo2@gmail.com> - 2011-04-03 15:52 -0500
      Re: Tk and Tile with Tk8.5 Albert Schlef <albertschlef@gmail.com> - 2011-04-04 07:57 -0500
        Re: Tk and Tile with Tk8.5 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-04-04 17:16 -0500
          Re: Tk and Tile with Tk8.5 Albert Schlef <albertschlef@gmail.com> - 2011-04-05 09:13 -0500
            Re: Tk and Tile with Tk8.5 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-04-05 15:37 -0500

csiph-web