summaryrefslogtreecommitdiff
path: root/ext/tk/sample
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 22:51:37 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 22:51:37 +0000
commit36f70bd423fd4605a07a256e2d4d0fc07537a36f (patch)
tree70336725806766f75afcce62b83bea82fcf6f3e8 /ext/tk/sample
parentc0497c5b43f7d091ba8ed5c7a1995e204398a7cd (diff)
* ext/tk/tkutil/tkutil.c: fix SEGV on TkUtil::CallbackSubst._setup_subst_table.
* 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/branches/ruby_1_8@26532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample')
-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