summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tk')
-rw-r--r--ext/tk/lib/tk/canvas.rb22
-rw-r--r--ext/tk/lib/tk/canvastag.rb22
-rw-r--r--ext/tk/lib/tk/dialog.rb49
-rw-r--r--ext/tk/lib/tk/event.rb9
-rw-r--r--ext/tk/lib/tk/font.rb143
-rw-r--r--ext/tk/lib/tk/frame.rb12
-rw-r--r--ext/tk/lib/tk/menu.rb22
-rw-r--r--ext/tk/lib/tk/radiobutton.rb4
-rw-r--r--ext/tk/lib/tk/text.rb22
-rw-r--r--ext/tk/lib/tk/textmark.rb4
-rw-r--r--ext/tk/lib/tk/texttag.rb22
-rw-r--r--ext/tk/lib/tk/toplevel.rb12
12 files changed, 278 insertions, 65 deletions
diff --git a/ext/tk/lib/tk/canvas.rb b/ext/tk/lib/tk/canvas.rb
index 9a042155e3..3bc08e94fc 100644
--- a/ext/tk/lib/tk/canvas.rb
+++ b/ext/tk/lib/tk/canvas.rb
@@ -94,12 +94,30 @@ class TkCanvas<TkWindow
*tags.collect{|t| tagid(t)}))
end
- def itembind(tag, context, cmd=Proc.new, *args)
+ #def itembind(tag, context, cmd=Proc.new, *args)
+ # _bind([path, "bind", tagid(tag)], context, cmd, *args)
+ # self
+ #end
+ def itembind(tag, context, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
_bind([path, "bind", tagid(tag)], context, cmd, *args)
self
end
- def itembind_append(tag, context, cmd=Proc.new, *args)
+ #def itembind_append(tag, context, cmd=Proc.new, *args)
+ # _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
+ # self
+ #end
+ def itembind_append(tag, context, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
_bind_append([path, "bind", tagid(tag)], context, cmd, *args)
self
end
diff --git a/ext/tk/lib/tk/canvastag.rb b/ext/tk/lib/tk/canvastag.rb
index 3d5c6703d2..5d1d5e92ab 100644
--- a/ext/tk/lib/tk/canvastag.rb
+++ b/ext/tk/lib/tk/canvastag.rb
@@ -21,12 +21,30 @@ module TkcTagAccess
@c.bbox(@id)
end
- def bind(seq, cmd=Proc.new, *args)
+ #def bind(seq, cmd=Proc.new, *args)
+ # @c.itembind(@id, seq, cmd, *args)
+ # self
+ #end
+ def bind(seq, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
@c.itembind(@id, seq, cmd, *args)
self
end
- def bind_append(seq, cmd=Proc.new, *args)
+ #def bind_append(seq, cmd=Proc.new, *args)
+ # @c.itembind_append(@id, seq, cmd, *args)
+ # self
+ #end
+ def bind_append(seq, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
@c.itembind_append(@id, seq, cmd, *args)
self
end
diff --git a/ext/tk/lib/tk/dialog.rb b/ext/tk/lib/tk/dialog.rb
index 2ced26b193..f7d17b5a96 100644
--- a/ext/tk/lib/tk/dialog.rb
+++ b/ext/tk/lib/tk/dialog.rb
@@ -3,7 +3,7 @@
#
require 'tk'
-class TkDialog2 < TkWindow
+class TkDialogObj < TkWindow
extend Tk
TkCommandNames = ['tk_dialog'.freeze].freeze
@@ -23,7 +23,9 @@ class TkDialog2 < TkWindow
c.delete('command'); c.delete(:command)
# @config << Kernel.format("%s.button%s configure %s; ",
# @path, i, hash_kv(c).join(' '))
- @config << @path+'.button'+i.to_s+'configure '+hash_kv(c).join(' ')+'; '
+ # @config << @path+'.button'+i.to_s+' configure '+hash_kv(c).join(' ')+'; '
+ @config << @path+'.button'+i.to_s+' configure '+
+ array2tk_list(hash_kv(c))+'; '
}
case configs
when Proc
@@ -74,7 +76,7 @@ class TkDialog2 < TkWindow
#@config = "puts [winfo children .w0000];"
@config = ""
- @command = nil
+ @command = prev_command
if keys.kind_of? Hash
@title = keys['title'] if keys.key? 'title'
@@ -84,7 +86,7 @@ class TkDialog2 < TkWindow
@default_button = keys['default'] if keys.key? 'default'
@buttons = keys['buttons'] if keys.key? 'buttons'
- @command = keys['prev_command']
+ @command = keys['prev_command'] if keys.key? 'prev_command'
@message_config = keys['message_config'] if keys.key? 'message_config'
@msgframe_config = keys['msgframe_config'] if keys.key? 'msgframe_config'
@@ -121,36 +123,44 @@ class TkDialog2 < TkWindow
if @message_config.kind_of? Hash
# @config << Kernel.format("%s.msg configure %s;",
# @path, hash_kv(@message_config).join(' '))
- @config << @path+'.msg configure '+hash_kv(@message_config).join(' ')+';'
+ # @config << @path+'.msg configure '+hash_kv(@message_config).join(' ')+';'
+ @config << @path+'.msg configure '+
+ array2tk_list(hash_kv(@message_config))+';'
end
if @msgframe_config.kind_of? Hash
# @config << Kernel.format("%s.top configure %s;",
# @path, hash_kv(@msgframe_config).join(' '))
- @config << @path+'.top configure '+hash_kv(@msgframe_config).join(' ')+';'
+ # @config << @path+'.top configure '+hash_kv(@msgframe_config).join(' ')+';'
+ @config << @path+'.top configure '+
+ array2tk_list(hash_kv(@msgframe_config))+';'
end
if @btnframe_config.kind_of? Hash
# @config << Kernel.format("%s.bot configure %s;",
# @path, hash_kv(@btnframe_config).join(' '))
- @config << @path+'.bot configure '+hash_kv(@btnframe_config).join(' ')+';'
+ # @config << @path+'.bot configure '+hash_kv(@btnframe_config).join(' ')+';'
+ @config << @path+'.bot configure '+
+ array2tk_list(hash_kv(@btnframe_config))+';'
end
if @bitmap_config.kind_of? Hash
# @config << Kernel.format("%s.bitmap configure %s;",
# @path, hash_kv(@bitmap_config).join(' '))
- @config << @path+'.bitmap configure '+hash_kv(@bitmap_config).join(' ')+';'
+ # @config << @path+'.bitmap configure '+hash_kv(@bitmap_config).join(' ')+';'
+ @config << @path+'.bitmap configure '+
+ array2tk_list(hash_kv(@bitmap_config))+';'
end
_set_button_config(@button_configs) if @button_configs
+ end
+ private :create_self
+ def show
if @command.kind_of? Proc
@command.call(self)
end
- end
- private :create_self
- def show
if @default_button.kind_of? String
default_button = @buttons.index(@default_button)
else
@@ -174,6 +184,10 @@ class TkDialog2 < TkWindow
# @var.value.to_i
@val
end
+
+ def name
+ @buttons[@val]
+ end
######################################################
# #
# these methods must be overridden for each dialog #
@@ -223,13 +237,17 @@ class TkDialog2 < TkWindow
# returns nil or a Hash {option=>value, ...} for the button frame
return nil
end
+ def prev_command
+ # returns nil or a Proc
+ return nil
+ end
end
-
+TkDialog2 = TkDialogObj
#
# TkDialog : with showing at initialize
#
-class TkDialog < TkDialog2
+class TkDialog < TkDialogObj
def self.show(*args)
self.new(*args)
end
@@ -244,7 +262,7 @@ end
#
# dialog for warning
#
-class TkWarning2 < TkDialog2
+class TkWarningObj < TkDialogObj
def initialize(parent = nil, mes = nil)
if !mes
if parent.kind_of? TkWindow
@@ -281,8 +299,9 @@ class TkWarning2 < TkDialog2
return "OK";
end
end
+TkWarning2 = TkWarningObj
-class TkWarning < TkWarning2
+class TkWarning < TkWarningObj
def self.show(*args)
self.new(*args)
end
diff --git a/ext/tk/lib/tk/event.rb b/ext/tk/lib/tk/event.rb
index 81d3e1c4c2..5af0fcd44d 100644
--- a/ext/tk/lib/tk/event.rb
+++ b/ext/tk/lib/tk/event.rb
@@ -130,6 +130,15 @@ module TkEvent
# []
#end
+ alias button num
+ alias delta wheel_delta
+ alias root rootwin_id
+ alias rootx x_root
+ alias root_x x_root
+ alias rooty y_root
+ alias root_y y_root
+ alias sendevent send_event
+
end
###############################################
diff --git a/ext/tk/lib/tk/font.rb b/ext/tk/lib/tk/font.rb
index 2ebe6612bd..1e314e5bb9 100644
--- a/ext/tk/lib/tk/font.rb
+++ b/ext/tk/lib/tk/font.rb
@@ -20,6 +20,17 @@ class TkFont
Tk_FontUseTBL.clear
}
+ # option_type : default => string
+ OptionType = Hash.new(?s)
+ OptionType['size'] = ?n
+ OptionType['pointadjust'] = ?n
+ OptionType['underline'] = ?b
+ OptionType['overstrike'] = ?b
+
+ # metric_type : default => num_or_str
+ MetricType = Hash.new(?n)
+ MetricType['fixed'] = ?b
+
# set default font
case Tk::TK_VERSION
when /^4\.*/
@@ -112,6 +123,8 @@ class TkFont
case type
when 'kanji', 'latin', 'ascii'
@type = type
+ when :kanji, :latin, :ascii
+ @type = type.to_s
else
fail ArgumentError, "unknown type '#{type}'"
end
@@ -637,7 +650,7 @@ class TkFont
begin
actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
rescue
- latinkeys {}
+ latinkeys = {}
end
if latinkeys != {}
tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
@@ -648,7 +661,7 @@ class TkFont
begin
actual_core(@kanjifont).each{|key,val| kanjikeys[key] = val}
rescue
- kanjikeys {}
+ kanjikeys = {}
end
if kanjikeys != {}
tk_call('font', 'configure', @compoundfont, *hash_kv(kanjikeys))
@@ -662,23 +675,41 @@ class TkFont
def actual_core_tk4x(font, window=nil, option=nil)
# dummy
- if option
- ""
+ if option == 'pointadjust' || option == :pointadjust
+ 1.0
+ elsif option
+ case OptionType[option.to_s]
+ when ?n
+ 0
+ when ?b
+ false
+ else
+ ''
+ end
else
- [['family',[]], ['size',[]], ['weight',[]], ['slant',[]],
- ['underline',[]], ['overstrike',[]], ['charset',[]],
- ['pointadjust',[]]]
+ [['family',''], ['size',0], ['weight',''], ['slant',''],
+ ['underline',false], ['overstrike',false], ['charset',''],
+ ['pointadjust',0]]
end
end
def actual_core_tk8x(font, window=nil, option=nil)
- if option == 'compound'
+ if option == 'compound' || option == :compound
""
elsif option
if window
- tk_call('font', 'actual', font, "-displayof", window, "-#{option}")
+ val = tk_call('font', 'actual', font,
+ "-displayof", window, "-#{option}")
+ else
+ val = tk_call('font', 'actual', font, "-#{option}")
+ end
+ case OptionType[option.to_s]
+ when ?n
+ num_or_str(val)
+ when ?b
+ bool(val)
else
- tk_call('font', 'actual', font, "-#{option}")
+ val
end
else
l = tk_split_simplelist(if window
@@ -692,7 +723,16 @@ class TkFont
if key == '-compound'
l.shift
else
- r.push [key[1..-1], l.shift]
+ key = key[1..-1]
+ val = l.shift
+ case OptionType[key]
+ when ?n
+ r.push [key, num_or_str(val)]
+ when ?b
+ r.push [key, bool(val)]
+ else
+ r.push [key, val]
+ end
end
end
r
@@ -707,12 +747,21 @@ class TkFont
def configinfo_core_tk4x(font, option=nil)
# dummy
if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- if option
- ""
+ if option == 'pointadjust' || option == :pointadjust
+ 1.0
+ elsif option
+ case OptionType[option.to_s]
+ when ?n
+ 0
+ when ?b
+ false
+ else
+ ''
+ end
else
- [['family',[]], ['size',[]], ['weight',[]], ['slant',[]],
- ['underline',[]], ['overstrike',[]], ['charset',[]],
- ['pointadjust',[]]]
+ [['family',''], ['size',0], ['weight',''], ['slant',''],
+ ['underline',false], ['overstrike',false], ['charset',''],
+ ['pointadjust',1.0]]
end
else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
current_configinfo_core_tk4x(font, option)
@@ -721,10 +770,18 @@ class TkFont
def current_configinfo_core_tk4x(font, option=nil)
if option
- ""
+ case OptionType[option.to_s]
+ when ?n
+ 0
+ when ?b
+ false
+ else
+ ''
+ end
else
- {'family'=>'', 'size'=>'', 'weight'=>'', 'slant'=>'',
- 'underline'=>'', 'overstrike'=>'', 'charset'=>'', 'pointadjust'=>''}
+ {'family'=>'', 'size'=>0, 'weight'=>'', 'slant'=>'',
+ 'underline'=>false, 'overstrike'=>false,
+ 'charset'=>false, 'pointadjust'=>1.0}
end
end
@@ -797,10 +854,18 @@ class TkFont
def configinfo_core_tk8x(font, option=nil)
if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- if option == 'compound'
+ if option == 'compound' || option == :compound
""
elsif option
- tk_call('font', 'configure', font, "-#{option}")
+ val = tk_call('font', 'configure', font, "-#{option}")
+ case OptionType[option.to_s]
+ when ?n
+ num_or_str(val)
+ when ?b
+ bool(val)
+ else
+ val
+ end
else
l = tk_split_simplelist(tk_call('font', 'configure', font))
r = []
@@ -808,7 +873,16 @@ class TkFont
if key == '-compound'
l.shift
else
- r.push [key[1..-1], l.shift]
+ key = key[1..-1]
+ val = l.shift
+ case OptionType[key]
+ when ?n
+ r.push [key, num_or_str(val)]
+ when ?b
+ r.push [key, bool(val)]
+ else
+ r.push [key, val]
+ end
end
end
r
@@ -822,7 +896,15 @@ class TkFont
if option == 'compound'
""
elsif option
- tk_call('font', 'configure', font, "-#{option}")
+ val = tk_call('font', 'configure', font, "-#{option}")
+ case OptionType[option.to_s]
+ when ?n
+ num_or_str(val)
+ when ?b
+ bool(val)
+ else
+ val
+ end
else
l = tk_split_simplelist(tk_call('font', 'configure', font))
r = {}
@@ -830,7 +912,16 @@ class TkFont
if key == '-compound'
l.shift
else
- r[key[1..-1]] = l.shift
+ key = key[1..-1]
+ val = l.shift
+ case OptionType[key]
+ when ?n
+ r.push [key, num_or_str(val)]
+ when ?b
+ r.push [key, bool(val)]
+ else
+ r.push [key, val]
+ end
end
end
r
@@ -958,7 +1049,7 @@ class TkFont
begin
actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
rescue
- latinkeys {}
+ latinkeys = {}
end
if latinkeys != {}
tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
@@ -981,7 +1072,7 @@ class TkFont
begin
actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
rescue
- latinkeys {}
+ latinkeys = {}
end
if latinkeys != {}
tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
diff --git a/ext/tk/lib/tk/frame.rb b/ext/tk/lib/tk/frame.rb
index 4f01825da9..519b9ae8a6 100644
--- a/ext/tk/lib/tk/frame.rb
+++ b/ext/tk/lib/tk/frame.rb
@@ -92,18 +92,18 @@ class TkFrame<TkWindow
self.database_class.name
end
- def self.bind(*args)
+ def self.bind(*args, &b)
if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args)
+ super(*args, &b)
else
- TkDatabaseClass.new(self.name).bind(*args)
+ TkDatabaseClass.new(self.name).bind(*args, &b)
end
end
- def self.bind_append(*args)
+ def self.bind_append(*args, &b)
if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args)
+ super(*args, &b)
else
- TkDatabaseClass.new(self.name).bind_append(*args)
+ TkDatabaseClass.new(self.name).bind_append(*args, &b)
end
end
def self.bind_remove(*args)
diff --git a/ext/tk/lib/tk/menu.rb b/ext/tk/lib/tk/menu.rb
index 1972193e51..8a33b482c7 100644
--- a/ext/tk/lib/tk/menu.rb
+++ b/ext/tk/lib/tk/menu.rb
@@ -3,6 +3,7 @@
#
require 'tk'
require 'tk/itemconfig'
+require 'tk/menuspec'
module TkMenuEntryConfig
include TkItemConfigMethod
@@ -33,6 +34,7 @@ end
class TkMenu<TkWindow
include TkMenuEntryConfig
+ extend TkMenuSpec
TkCommandNames = ['menu'.freeze].freeze
WidgetClassName = 'Menu'.freeze
@@ -47,6 +49,24 @@ class TkMenu<TkWindow
#end
#private :create_self
+ def self.new_menuspec(menu_spec, parent = nil, tearoff = false, keys = nil)
+ if parent.kind_of?(Hash)
+ keys = _symbolkey2str(parent)
+ parent = keys.delete('parent')
+ tearoff = keys.delete('tearoff')
+ elsif tearoff.kind_of?(Hash)
+ keys = _symbolkey2str(tearoff)
+ tearoff = keys.delete('tearoff')
+ elsif keys
+ keys = _symbolkey2str(keys)
+ else
+ keys = {}
+ end
+
+ widgetname = keys.delete('widgetname')
+ _create_menu(parent, menu_spec, widgetname, tearoff, keys)
+ end
+
def tagid(id)
#id.to_s
_get_eval_string(id)
@@ -389,6 +409,7 @@ class TkMenubutton<TkLabel
end
private :create_self
end
+TkMenuButton = TkMenubutton
class TkOptionMenubutton<TkMenubutton
@@ -509,3 +530,4 @@ class TkOptionMenubutton<TkMenubutton
@menu.current_entryconfiginfo(index, key)
end
end
+TkOptionMenuButton = TkOptionMenubutton
diff --git a/ext/tk/lib/tk/radiobutton.rb b/ext/tk/lib/tk/radiobutton.rb
index 8ee67bde68..5649a5c447 100644
--- a/ext/tk/lib/tk/radiobutton.rb
+++ b/ext/tk/lib/tk/radiobutton.rb
@@ -29,7 +29,7 @@ class TkRadioButton<TkButton
configure 'variable', tk_trace_variable(v)
end
- def value
+ def get_value
var = tk_send_without_enc('cget', '-variable')
if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS
_fromUTF8(INTERP._get_global_var(var))
@@ -38,7 +38,7 @@ class TkRadioButton<TkButton
end
end
- def value=(val)
+ def set_value(val)
var = tk_send_without_enc('cget', '-variable')
if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS
_fromUTF8(INTERP._set_global_var(var, _get_eval_string(val, true)))
diff --git a/ext/tk/lib/tk/text.rb b/ext/tk/lib/tk/text.rb
index fbe1c08c76..49b769403a 100644
--- a/ext/tk/lib/tk/text.rb
+++ b/ext/tk/lib/tk/text.rb
@@ -519,12 +519,30 @@ class TkText<TkTextWin
alias deltag tag_delete
alias delete_tag tag_delete
- def tag_bind(tag, seq, cmd=Proc.new, *args)
+ #def tag_bind(tag, seq, cmd=Proc.new, *args)
+ # _bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
+ # self
+ #end
+ def tag_bind(tag, seq, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
_bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
self
end
- def tag_bind_append(tag, seq, cmd=Proc.new, *args)
+ #def tag_bind_append(tag, seq, cmd=Proc.new, *args)
+ # _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
+ # self
+ #end
+ def tag_bind_append(tag, seq, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
_bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
self
end
diff --git a/ext/tk/lib/tk/textmark.rb b/ext/tk/lib/tk/textmark.rb
index 6004b86028..fbe57a4cc3 100644
--- a/ext/tk/lib/tk/textmark.rb
+++ b/ext/tk/lib/tk/textmark.rb
@@ -122,13 +122,13 @@ class TkTextMarkInsert<TkTextNamedMark
end
end
-class TkTextMarkCurrent<TkTextMark
+class TkTextMarkCurrent<TkTextNamedMark
def self.new(parent,*args)
super(parent, 'current', *args)
end
end
-class TkTextMarkAnchor<TkTextMark
+class TkTextMarkAnchor<TkTextNamedMark
def self.new(parent,*args)
super(parent, 'anchor', *args)
end
diff --git a/ext/tk/lib/tk/texttag.rb b/ext/tk/lib/tk/texttag.rb
index 78f7469869..37b83cc4aa 100644
--- a/ext/tk/lib/tk/texttag.rb
+++ b/ext/tk/lib/tk/texttag.rb
@@ -162,12 +162,30 @@ class TkTextTag<TkObject
@t.current_tag_configinfo @id, key
end
- def bind(seq, cmd=Proc.new, *args)
+ #def bind(seq, cmd=Proc.new, *args)
+ # _bind([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
+ # self
+ #end
+ def bind(seq, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
_bind([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
self
end
- def bind_append(seq, cmd=Proc.new, *args)
+ #def bind_append(seq, cmd=Proc.new, *args)
+ # _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
+ # self
+ #end
+ def bind_append(seq, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
_bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
self
end
diff --git a/ext/tk/lib/tk/toplevel.rb b/ext/tk/lib/tk/toplevel.rb
index b96e184aab..95d6366ea3 100644
--- a/ext/tk/lib/tk/toplevel.rb
+++ b/ext/tk/lib/tk/toplevel.rb
@@ -201,18 +201,18 @@ class TkToplevel<TkWindow
self.database_class.name
end
- def self.bind(*args)
+ def self.bind(*args, &b)
if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args)
+ super(*args, &b)
else
- TkDatabaseClass.new(self.name).bind(*args)
+ TkDatabaseClass.new(self.name).bind(*args, &b)
end
end
- def self.bind_append(*args)
+ def self.bind_append(*args, &b)
if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args)
+ super(*args, &b)
else
- TkDatabaseClass.new(self.name).bind_append(*args)
+ TkDatabaseClass.new(self.name).bind_append(*args, &b)
end
end
def self.bind_remove(*args)