summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/bwidget/labelentry.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/bwidget/labelentry.rb')
-rw-r--r--ext/tk/lib/tkextlib/bwidget/labelentry.rb26
1 files changed, 22 insertions, 4 deletions
diff --git a/ext/tk/lib/tkextlib/bwidget/labelentry.rb b/ext/tk/lib/tkextlib/bwidget/labelentry.rb
index 7a6a7f01d6..1425ef7730 100644
--- a/ext/tk/lib/tkextlib/bwidget/labelentry.rb
+++ b/ext/tk/lib/tkextlib/bwidget/labelentry.rb
@@ -23,13 +23,31 @@ class Tk::BWidget::LabelEntry
WidgetClassName = 'LabelEntry'.freeze
WidgetClassNames[WidgetClassName] = self
- def entrybind(*args)
- _bind([path, 'bind'], *args)
+ #def entrybind(*args)
+ # _bind([path, 'bind'], *args)
+ # self
+ #end
+ def entrybind(context, *args)
+ if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ cmd = args.shift
+ else
+ cmd = Proc.new
+ end
+ _bind([path, 'bind'], context, cmd, *args)
self
end
- def entrybind_append(*args)
- _bind_append([path, 'bind'], *args)
+ #def entrybind_append(*args)
+ # _bind_append([path, 'bind'], *args)
+ # self
+ #end
+ def entrybind_append(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'], context, cmd, *args)
self
end