summaryrefslogtreecommitdiff
path: root/ext/tk/sample
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-17 05:21:16 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-17 05:21:16 +0000
commitc58dc636862b79c97d32d056d816c24f2aa13d58 (patch)
tree2a6e950bc6bb99b699046c76e6a5d60d137a293c /ext/tk/sample
parent4c68aa718dee39d514aaa042d0e8108fea293d3f (diff)
* ext/tk/extconf.rb: support s390x (Thanks to bkabrda) [ruby-trunk - Bug #5465]
* ext/tk/extconf.rb: apply [Backport87 - Backport #5048] * ext/tk/lib/tk/canvas.rb, ext/tk/sample/demos-{en,jp}/{tree.rb,widget}: fix bug (Thanks to zzak) [ruby-trunk - Bug #8319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample')
-rw-r--r--ext/tk/sample/demos-en/tree.rb2
-rw-r--r--ext/tk/sample/demos-en/widget6
-rw-r--r--ext/tk/sample/demos-jp/tree.rb2
-rw-r--r--ext/tk/sample/demos-jp/widget6
4 files changed, 8 insertions, 8 deletions
diff --git a/ext/tk/sample/demos-en/tree.rb b/ext/tk/sample/demos-en/tree.rb
index cd62ba8..69154ee 100644
--- a/ext/tk/sample/demos-en/tree.rb
+++ b/ext/tk/sample/demos-en/tree.rb
@@ -67,7 +67,7 @@ def populate_tree(tree, node)
path = tree.get(node, :fullpath)
tree.delete(tree.children(node))
Dir.glob("#{path}/*").sort.each{|f|
- type = File.ftype(f)
+ type = File.ftype(f) rescue nil
id = tree.insert(node, :end,
:text=>File.basename(f), :values=>[f, type]).id
if type == 'directory'
diff --git a/ext/tk/sample/demos-en/widget b/ext/tk/sample/demos-en/widget
index 21dd416..fb49a74 100644
--- a/ext/tk/sample/demos-en/widget
+++ b/ext/tk/sample/demos-en/widget
@@ -683,7 +683,7 @@ def eval_samplecode(code, file=nil)
end
}
}
- Tk.update
+ Tk.update rescue nil
end
# invoke --
@@ -699,7 +699,7 @@ def invoke(txt, idx)
cursor = txt.cget('cursor')
txt.cursor('watch')
- Tk.update
+ Tk.update rescue nil
# eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
# Tk.update
eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb')
@@ -1058,7 +1058,7 @@ if ARGV[0] == '-n'
no_launcher = true if ARGV.size > 0
else
# show the root widget to make it lower then demo windows
- Tk.update
+ Tk.update rescue nil
end
ARGV.each{|cmd|
if cmd =~ /(.*).rb/
diff --git a/ext/tk/sample/demos-jp/tree.rb b/ext/tk/sample/demos-jp/tree.rb
index 1c77939..3f3b18b 100644
--- a/ext/tk/sample/demos-jp/tree.rb
+++ b/ext/tk/sample/demos-jp/tree.rb
@@ -68,7 +68,7 @@ def populate_tree(tree, node)
path = tree.get(node, :fullpath)
tree.delete(tree.children(node))
Dir.glob("#{path}/*").sort.each{|f|
- type = File.ftype(f)
+ type = File.ftype(f) rescue nil
id = tree.insert(node, :end,
:text=>File.basename(f), :values=>[f, type]).id
if type == 'directory'
diff --git a/ext/tk/sample/demos-jp/widget b/ext/tk/sample/demos-jp/widget
index 193c15a..5f5dfb9 100644
--- a/ext/tk/sample/demos-jp/widget
+++ b/ext/tk/sample/demos-jp/widget
@@ -740,7 +740,7 @@ def eval_samplecode(code, file=nil)
end
}
}
- Tk.update
+ Tk.update rescue nil
end
# テキスト上での click に対する動作
@@ -750,7 +750,7 @@ def invoke(txt, idx)
cursor = txt.cget('cursor')
txt.cursor('watch')
- Tk.update
+ Tk.update rescue nil
# eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
# Tk.update
eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb')
@@ -1094,7 +1094,7 @@ if ARGV[0] == '-n'
no_launcher = true if ARGV.size > 0
else
# show the root widget to make it lower then demo windows
- Tk.update
+ Tk.update rescue nil
end
ARGV.each{|cmd|
if cmd =~ /(.*).rb/