summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-15 03:12:40 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-15 03:12:40 +0000
commitf895f94cce55af4df0c5dfb9ee59bd71ede40be6 (patch)
tree649b9c57a758262c007da79749be91e33b627202 /ext/tk/lib/tk.rb
parent60ed1ef3c0bb22171991dbc72977dd7f33f0e3eb (diff)
* ext/tk/lib/tk.rb: bug fix (TkWindow#grab)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk.rb')
-rw-r--r--ext/tk/lib/tk.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 5ac6724b84..8462c3064c 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -2706,6 +2706,9 @@ class TkWindow<TkObject
end
case opt
+ when 'set', :set
+ tk_call_without_enc('grab', 'set', path)
+ return self
when 'global', :global
#return(tk_call('grab', 'set', '-global', path))
tk_call_without_enc('grab', 'set', '-global', path)
@@ -2719,22 +2722,26 @@ class TkWindow<TkObject
when 'status', :status
return tk_call_without_enc('grab', 'status', path)
else
- return tk_call_without_enc('grab', args[0], path)
+ return tk_call_without_enc('grab', opt, path)
end
end
def grab_current
grab('current')
end
+ alias current_grab grab_current
def grab_release
grab('release')
end
+ alias release_grab grab_release
def grab_set
grab('set')
end
+ alias set_grab grab_set
def grab_set_global
grab('global')
end
+ alias set_global_grab grab_set_global
def grab_status
grab('status')
end