[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Using [incr Widgets] in Ruby/Tk on OS X

Morton Goldberg

9/1/2006 2:43:00 AM

I'm using Ruby 1.8.2 on Mac OS X 10.4.7. I discovered the Ruby
distribution included a directory supporting [incr Widgets]. Some of
them seemed pretty nifty, so I thought I'd try them out. My first try
was to make an "instant" calendar with the Calendar widget. After a
bit of fooling around I got a calendar up on my screen, but one of
things I had to do to make it work bothers me.

The [incr Widgets] support files live in /usr/lib/ruby/1.8/tkextlib/
iwidgets/. There is a file, /usr/lib/ruby/1.8/tkextlib/iwidgets.rb,
that autoloads the iwidget classes. However, the iwidgets.rb is is
coded with lines like

autoload :Calendar, 'tkextlib/iwidgets/calendar'

which means iwidgets.rb has to be one directory level up (in /usr/lib/
ruby/1.8/) to work. So I put a copy of iwidgets.rb in in /usr/lib/
ruby/1.8/. With that hack, "require 'iwidgets'" works -- at least in
the short term. But what will happen if Apple installs a newer
version of Ruby as part of an OS X update? Is there a better way to
fix this sort of problem?

Regards, Morton

5 Answers

Hidetoshi NAGAI

9/1/2006 3:01:00 AM

0

Morton Goldberg

9/1/2006 4:21:00 AM

0

Thanks very much. That's what I needed to know. I don't know why I
didn't think of it myself, but I didn't.

Regards, Morton

On Aug 31, 2006, at 11:01 PM, Hidetoshi NAGAI wrote:

> From: Morton Goldberg <m_goldberg@ameritech.net>
> Subject: Using [incr Widgets] in Ruby/Tk on OS X
> Date: Fri, 1 Sep 2006 11:43:09 +0900
> Message-ID: <8F88D2EC-9D3E-49AE-AD6C-83267C6FB012@ameritech.net>
>> which means iwidgets.rb has to be one directory level up (in /usr/
>> lib/
>> ruby/1.8/) to work. So I put a copy of iwidgets.rb in in /usr/lib/
>> ruby/1.8/. With that hack, "require 'iwidgets'" works -- at least in
>
> Please use "require 'tkextlib/iwidgets'".
> It will load "tkextlib/iwidgets.rb".
> --
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
>


pere.noel

9/1/2006 6:25:00 AM

0

Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> wrote:

>
> Please use "require 'tkextlib/iwidgets'".
> It will load "tkextlib/iwidgets.rb".

i wanted to experiment that too, reading "SUPPORT_STATUS" gave me this
address :
IWidgets 4.0.2 http://sf.net/projec... ==> iwidgets

being broken :
Invalid Project on sf...
--
une bévue

pere.noel

9/1/2006 6:31:00 AM

0

Une bévue <pere.noel@laponie.com.invalid> wrote:

> IWidgets 4.0.2 http://sf.net/projec... ==> iwidgets

the correct link seems to be :

http://incrtcl.source...
--
une bévue

Hidetoshi NAGAI

9/1/2006 9:46:00 AM

0