aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/sample/tkballoonhelp.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 22:50:43 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 22:50:43 +0000
commit023a34526bed14f11d66b1e0998de061e34e8a3b (patch)
tree9bab237a28ef0ad7b9f5b4295b43f12e45e55e85 /ext/tk/sample/tkballoonhelp.rb
parent8d33d0a5609455a334e53e1530409530a3a5ceed (diff)
downloadruby-023a34526bed14f11d66b1e0998de061e34e8a3b.tar.gz
* ext/tk/tkutil/tkutil.c: fix SEGV on TkUtil::CallbackSubst._setup_subst_table.
* ext/tk/lib/tk.rb: [ruby1.9] fix freeze at exit. * ext/tk/lib/tk.rb: [POTENTIAL INCOMPATIBLE] return NoMethodError for TkWindow#to_ary and to_str. * ext/tk/lib/tkextlib/tcllib/plotchart.rb: wrong arguments. * ext/tk/sampel/tkballoonhelp.rb: fail to support TkEntry widgets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkballoonhelp.rb')
-rw-r--r--ext/tk/sample/tkballoonhelp.rb18
1 files changed, 15 insertions, 3 deletions
diff --git a/ext/tk/sample/tkballoonhelp.rb b/ext/tk/sample/tkballoonhelp.rb
index a9bd371db6..a9c00d230d 100644
--- a/ext/tk/sample/tkballoonhelp.rb
+++ b/ext/tk/sample/tkballoonhelp.rb
@@ -111,12 +111,24 @@ class Tk::RbWidget::BalloonHelp<TkLabel
@frame.deiconify
@frame.raise
- @org_cursor = @parent['cursor']
- @parent.cursor('crosshair')
+ begin
+ @org_cursor = @parent.cget('cursor')
+ rescue
+ @org_cursor = @parent['cursor']
+ end
+ begin
+ @parent.configure('cursor', 'crosshair')
+ rescue
+ @parent.cursor('crosshair')
+ end
end
def erase
- @parent.cursor(@org_cursor)
+ begin
+ @parent.configure('cursor', @org_cursor)
+ rescue
+ @parent.cursor(@org_cursor)
+ end
@frame.withdraw
end