summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/textwindow.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-16 07:13:14 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-16 07:13:14 +0000
commit9e51ec666b367a8bca102d8f858173cc7ed56e12 (patch)
tree5597a08bc2b54a058625fb6e088cb34a15d3bfa3 /ext/tk/lib/tk/textwindow.rb
parentc89c302d3ff426d3f8a21da16cc8c2c8e42613a2 (diff)
* ext/tk/lib/tk/bindtag.rb: bug fix [ruby-talk: 123667]
* ext/tk/lib/tk/timer.rb: accept :idle for the interval argument * ext/tk/lib/tk.rb: add TkComm._callback_entry?() * ext/tk/lib/multi-tk.rb: add MultiTkIp.cb_entry_class * ext/tk/lib/tk/canvas.rb: use TkComm._callback_entry?() * ext/tk/lib/tk/canvastag.rb: ditto * ext/tk/lib/tk/dialog.rb: ditto * ext/tk/lib/tk/optiondb.rb: ditto * ext/tk/lib/tk/text.rb: ditto * ext/tk/lib/tk/texttag.rb: ditto * ext/tk/lib/tk/textwindow.rb: ditto * ext/tk/lib/tk/timer.rb: ditto * ext/tk/lib/tk/validation.rb: ditto * ext/tk/lib/tkextlib/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/textwindow.rb')
-rw-r--r--ext/tk/lib/tk/textwindow.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/tk/lib/tk/textwindow.rb b/ext/tk/lib/tk/textwindow.rb
index 59fafff181..c53cbe1a70 100644
--- a/ext/tk/lib/tk/textwindow.rb
+++ b/ext/tk/lib/tk/textwindow.rb
@@ -13,7 +13,7 @@ class TkTextWindow<TkObject
if index == 'end'
@path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index',
'end - 1 chars'))
- elsif index.kind_of? TkTextMark
+ elsif index.kind_of?(TkTextMark)
if tk_call_without_enc(@t.path,'index',index.path) == tk_call_without_enc(@t.path,'index','end')
@path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index',
'end - 1 chars'))
@@ -32,7 +32,8 @@ class TkTextWindow<TkObject
keys['window'] = _epath(@id) if @id
if keys['create']
@p_create = keys['create']
- if @p_create.kind_of? Proc
+ # if @p_create.kind_of?(Proc)
+ if TkComm._callback_entry?(@p_create)
=begin
keys['create'] = install_cmd(proc{
@id = @p_create.call
@@ -63,7 +64,7 @@ class TkTextWindow<TkObject
end
def configure(slot, value=None)
- if slot.kind_of? Hash
+ if slot.kind_of?(Hash)
slot = _symbolkey2str(slot)
if slot['window']
@id = slot['window']
@@ -120,7 +121,8 @@ class TkTextWindow<TkObject
def create=(value)
@p_create = value
- if @p_create.kind_of? Proc
+ # if @p_create.kind_of?(Proc)
+ if TkComm._callback_entry?(@p_create)
value = install_cmd(proc{
@id = @p_create.call
if @id.kind_of?(TkWindow)