summaryrefslogtreecommitdiff
path: root/ext/tk/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib')
-rw-r--r--ext/tk/lib/multi-tk.rb1
-rw-r--r--ext/tk/lib/tk.rb5
-rw-r--r--ext/tk/lib/tkdialog.rb4
-rw-r--r--ext/tk/lib/tkentry.rb7
4 files changed, 17 insertions, 0 deletions
diff --git a/ext/tk/lib/multi-tk.rb b/ext/tk/lib/multi-tk.rb
index 00d0182472..06d21d2f0a 100644
--- a/ext/tk/lib/multi-tk.rb
+++ b/ext/tk/lib/multi-tk.rb
@@ -27,6 +27,7 @@ MultiTkIp_OK.freeze
class MultiTkIp
# ignore exception on the mainloop
+ #TclTkLib.mainloop_abort_on_exception = false
TclTkLib.mainloop_abort_on_exception = nil
######################################
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 13e41ece44..7b7b116a14 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -1693,6 +1693,11 @@ class TkVariable
@id = Tk_VARIABLE_ID.join
Tk_VARIABLE_ID[1].succ!
TkVar_ID_TBL[@id] = self
+
+ @trace_var = nil
+ @trace_elem = nil
+ @trace_opts = nil
+
if val == []
INTERP._eval(format('global %s; set %s(0) 0; unset %s(0)',
@id, @id, @id))
diff --git a/ext/tk/lib/tkdialog.rb b/ext/tk/lib/tkdialog.rb
index b15b79421b..febe470376 100644
--- a/ext/tk/lib/tkdialog.rb
+++ b/ext/tk/lib/tkdialog.rb
@@ -57,6 +57,7 @@ class TkDialog2 < TkWindow
@message = message
@message_config = message_config
+ @msgframe_config = msgframe_config
@bitmap = bitmap
@bitmap_config = message_config
@@ -65,10 +66,13 @@ class TkDialog2 < TkWindow
@buttons = buttons
@button_configs = proc{|num| button_configs(num)}
+ @btnframe_config = btnframe_config
#@config = "puts [winfo children .w0000];"
@config = ""
+ @command = nil
+
if keys.kind_of? Hash
keys = _symbolkey2str(keys)
@title = keys['title'] if keys.key? 'title'
diff --git a/ext/tk/lib/tkentry.rb b/ext/tk/lib/tkentry.rb
index 62b6535ef3..ccfb7928ac 100644
--- a/ext/tk/lib/tkentry.rb
+++ b/ext/tk/lib/tkentry.rb
@@ -140,6 +140,9 @@ class TkEntry<TkLabel
self
end
+ def bbox(index)
+ list(tk_send('bbox', index))
+ end
def cursor
number(tk_send('index', 'insert'))
end
@@ -154,6 +157,10 @@ class TkEntry<TkLabel
tk_send 'insert', pos, text
self
end
+ def delete(first, last=None)
+ tk_send 'insert', first, last
+ self
+ end
def mark(pos)
tk_send 'scan', 'mark', pos
self