Hi,
[Solaris 8]
I tried running the scripts under ruby-1.8.1/ext/tk/sample/demos-en/
and none of them seem to work:
~/ruby-1.8.1/ext/tk/sample/demos-en> ruby filebox.rb
filebox.rb:14: uninitialized constant TkToplevel (NameError)
So I edit filebox.rb and add ‘require tk’, and re-run:
/export/users/paul/local/lib/ruby/1.8/tk.rb:1623:in __invoke': unknown option "-positionWindow" (RuntimeError) from /export/users/paul/local/lib/ruby/1.8/tk.rb:1623:in
_invoke’
from /export/users/paul/local/lib/ruby/1.8/tk.rb:1027:in
tk_call' from /export/users/paul/local/lib/ruby/1.8/tk.rb:3848:in
configure’
from /export/users/paul/local/lib/ruby/1.8/tk.rb:3783:in
method_missing' from filebox.rb:18 from filebox.rb:15:in
new’
from filebox.rb:15:in `new’
from filebox.rb:15
Has anyone got any of these demos to work??!!! On a positive note, I
can get almost all of the scripts under ~/ruby-1.8.1/ext/tk/sample to
work fine.
Paul
... at least thats what ya consider 4 non-win os, as for win you have to
make small changes to the source, here's my suggestion: since cat doesnt
work for use we go with the dos equivalent TYPE, but wait: dos uses \'es
instead of /'es ... so, inside widget.rb change:
$demo_dir = File.dirname($0)
to
$demo_dir = File.dirname($0).gsub(/\//,'\\')
and in the bottom we use type and \'s:
eval `TYPE #{[$demo_dir, tag[5..-1]].join("\\")}.rb`
yeah, i know kinda lame ...
okok, being nice today, if you totaly dislike dos and type and want your
own cat... well just do it!
1. Edit widget.rb, replace the line
eval `cat #{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb`
with
eval `ruby cat.rb #{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb`
(so you can leave the seperators as /)
2. create your own cat.rb in the same folder (as widget.rb), here's the
simple content:
f=File.open(ARGV[0],"r")
f.each do |line| print line end
f.close
... although its pointless 
Hi,
At Sun, 15 May 2005 00:35:30 +0900,
neodrace wrote in [ruby-talk:142638]:
... at least thats what ya consider 4 non-win os, as for win you have to
make small changes to the source, here's my suggestion: since cat doesnt
work for use we go with the dos equivalent TYPE, but wait: dos uses \'es
instead of /'es ... so, inside widget.rb change:
It already has no longer used an external command there.
···
--
Nobu Nakada