mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 'format'==>'Kernel.format' (avoid override trouble)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3bab670fc
commit
a7c382223c
6 changed files with 76 additions and 63 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
Wed Dec 3 13:49:07 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb: 'format'==>'Kernel.format' (avoid override trouble)
|
||||||
|
|
||||||
|
* ext/tk/lib/tkafter.rb: ditto.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkcanvas.rb: ditto.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkdialog.rb: ditto.
|
||||||
|
|
||||||
|
* ext/tk/lib/tktext.rb: ditto.
|
||||||
|
|
||||||
Wed Dec 3 13:28:13 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Dec 3 13:28:13 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* Makefile.in (lex.c): try gperf first, and copy from the source
|
* Makefile.in (lex.c): try gperf first, and copy from the source
|
||||||
|
|
|
@ -229,7 +229,8 @@ module TkComm
|
||||||
when /^-?\d+\.?\d*(e[-+]?\d+)?$/
|
when /^-?\d+\.?\d*(e[-+]?\d+)?$/
|
||||||
val.to_f
|
val.to_f
|
||||||
else
|
else
|
||||||
fail ArgumentError, format('invalid value for Number:"%s"', val.to_s)
|
fail(ArgumentError,
|
||||||
|
Kernel.format('invalid value for Number:"%s"', val.to_s))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def string(val)
|
def string(val)
|
||||||
|
@ -334,7 +335,7 @@ module TkComm
|
||||||
@cmdtbl = [] unless defined? @cmdtbl
|
@cmdtbl = [] unless defined? @cmdtbl
|
||||||
@cmdtbl.taint unless @cmdtbl.tainted?
|
@cmdtbl.taint unless @cmdtbl.tainted?
|
||||||
@cmdtbl.push id
|
@cmdtbl.push id
|
||||||
return format("rb_out %s", id);
|
return Kernel.format("rb_out %s", id);
|
||||||
end
|
end
|
||||||
def uninstall_cmd(id)
|
def uninstall_cmd(id)
|
||||||
id = $1 if /rb_out (c\d+)/ =~ id
|
id = $1 if /rb_out (c\d+)/ =~ id
|
||||||
|
@ -354,9 +355,9 @@ module TkComm
|
||||||
if name[0] == ?.
|
if name[0] == ?.
|
||||||
@path = name.dup
|
@path = name.dup
|
||||||
elsif !ppath or ppath == "."
|
elsif !ppath or ppath == "."
|
||||||
@path = format(".%s", name);
|
@path = Kernel.format(".%s", name);
|
||||||
else
|
else
|
||||||
@path = format("%s.%s", ppath, name)
|
@path = Kernel.format("%s.%s", ppath, name)
|
||||||
end
|
end
|
||||||
#Tk_WINDOWS[@path] = self
|
#Tk_WINDOWS[@path] = self
|
||||||
TkCore::INTERP.tk_windows[@path] = self
|
TkCore::INTERP.tk_windows[@path] = self
|
||||||
|
@ -1549,8 +1550,8 @@ module Tk
|
||||||
|
|
||||||
def self.tk_escape(str)
|
def self.tk_escape(str)
|
||||||
s = '"' + str.gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
s = '"' + str.gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
||||||
TkCore::INTERP.__eval(format('global %s; set %s %s',
|
TkCore::INTERP.__eval(Kernel.format('global %s; set %s %s',
|
||||||
@@enc_buf, @@enc_buf, s))
|
@@enc_buf, @@enc_buf, s))
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.new(str, enc = Tk.encoding_system)
|
def self.new(str, enc = Tk.encoding_system)
|
||||||
|
@ -1782,7 +1783,7 @@ class TkBindTag
|
||||||
end
|
end
|
||||||
|
|
||||||
def inspect
|
def inspect
|
||||||
format "#<TkBindTag: %s>", @id
|
Kernel.format "#<TkBindTag: %s>", @id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1808,7 +1809,7 @@ class TkDatabaseClass<TkBindTag
|
||||||
end
|
end
|
||||||
|
|
||||||
def inspect
|
def inspect
|
||||||
format "#<TkDatabaseClass: %s>", @id
|
Kernel.format "#<TkDatabaseClass: %s>", @id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1871,10 +1872,10 @@ class TkVariable
|
||||||
if val.kind_of?(Hash)
|
if val.kind_of?(Hash)
|
||||||
s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
|
s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
|
||||||
.gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
.gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
||||||
INTERP._eval(format('global %s; array set %s %s', @id, @id, s))
|
INTERP._eval(Kernel.format('global %s; array set %s %s', @id, @id, s))
|
||||||
else
|
else
|
||||||
s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
||||||
INTERP._eval(format('global %s; set %s %s', @id, @id, s))
|
INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1918,14 +1919,13 @@ class TkVariable
|
||||||
|
|
||||||
def value
|
def value
|
||||||
begin
|
begin
|
||||||
INTERP._eval(format('global %s; set %s', @id, @id))
|
INTERP._eval(Kernel.format('global %s; set %s', @id, @id))
|
||||||
rescue
|
rescue
|
||||||
if INTERP._eval(format('global %s; array exists %s', @id, @id)) != "1"
|
if INTERP._eval(Kernel.format('global %s; array exists %s',
|
||||||
|
@id, @id)) != "1"
|
||||||
fail
|
fail
|
||||||
else
|
else
|
||||||
Hash[*tk_split_simplelist(INTERP.
|
Hash[*tk_split_simplelist(INTERP._eval(Kernel.format('global %s; array get %s', @id, @id)))]
|
||||||
_eval(format('global %s; array get %s',
|
|
||||||
@id, @id)))]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1933,25 +1933,25 @@ class TkVariable
|
||||||
def value=(val)
|
def value=(val)
|
||||||
begin
|
begin
|
||||||
s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
||||||
INTERP._eval(format('global %s; set %s %s', @id, @id, s))
|
INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
|
||||||
rescue
|
rescue
|
||||||
if INTERP._eval(format('global %s; array exists %s', @id, @id)) != "1"
|
if INTERP._eval(Kernel.format('global %s; array exists %s',
|
||||||
|
@id, @id)) != "1"
|
||||||
fail
|
fail
|
||||||
else
|
else
|
||||||
if val == []
|
if val == []
|
||||||
INTERP._eval(format('global %s; unset %s; set %s(0) 0; unset %s(0)',
|
INTERP._eval(Kernel.format('global %s; unset %s; set %s(0) 0; unset %s(0)', @id, @id, @id, @id))
|
||||||
@id, @id, @id, @id))
|
|
||||||
elsif val.kind_of?(Array)
|
elsif val.kind_of?(Array)
|
||||||
a = []
|
a = []
|
||||||
val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e))}
|
val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e))}
|
||||||
s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
||||||
INTERP._eval(format('global %s; unset %s; array set %s %s',
|
INTERP._eval(Kernel.format('global %s; unset %s; array set %s %s',
|
||||||
@id, @id, @id, s))
|
@id, @id, @id, s))
|
||||||
elsif val.kind_of?(Hash)
|
elsif val.kind_of?(Hash)
|
||||||
s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
|
s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
|
||||||
.gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
.gsub(/[\[\]$"]/, '\\\\\&') + '"'
|
||||||
INTERP._eval(format('global %s; unset %s; array set %s %s',
|
INTERP._eval(Kernel.format('global %s; unset %s; array set %s %s',
|
||||||
@id, @id, @id, s))
|
@id, @id, @id, s))
|
||||||
else
|
else
|
||||||
fail
|
fail
|
||||||
end
|
end
|
||||||
|
@ -1960,13 +1960,13 @@ class TkVariable
|
||||||
end
|
end
|
||||||
|
|
||||||
def [](index)
|
def [](index)
|
||||||
INTERP._eval(format('global %s; set %s(%s)',
|
INTERP._eval(Kernel.format('global %s; set %s(%s)',
|
||||||
@id, @id, _get_eval_string(index)))
|
@id, @id, _get_eval_string(index)))
|
||||||
end
|
end
|
||||||
|
|
||||||
def []=(index,val)
|
def []=(index,val)
|
||||||
INTERP._eval(format('global %s; set %s(%s) %s', @id, @id,
|
INTERP._eval(Kernel.format('global %s; set %s(%s) %s', @id, @id,
|
||||||
_get_eval_string(index), _get_eval_string(val)))
|
_get_eval_string(index), _get_eval_string(val)))
|
||||||
end
|
end
|
||||||
|
|
||||||
def numeric
|
def numeric
|
||||||
|
@ -2016,7 +2016,7 @@ class TkVariable
|
||||||
end
|
end
|
||||||
|
|
||||||
def inspect
|
def inspect
|
||||||
format "#<TkVariable: %s>", @id
|
Kernel.format "#<TkVariable: %s>", @id
|
||||||
end
|
end
|
||||||
|
|
||||||
def coerce(other)
|
def coerce(other)
|
||||||
|
@ -2151,10 +2151,10 @@ class TkVariable
|
||||||
|
|
||||||
def unset(elem=nil)
|
def unset(elem=nil)
|
||||||
if elem
|
if elem
|
||||||
INTERP._eval(format('global %s; unset %s(%s)',
|
INTERP._eval(Kernel.format('global %s; unset %s(%s)',
|
||||||
@id, @id, tk_tcl2ruby(elem)))
|
@id, @id, tk_tcl2ruby(elem)))
|
||||||
else
|
else
|
||||||
INTERP._eval(format('global %s; unset %s', @id, @id))
|
INTERP._eval(Kernel.format('global %s; unset %s', @id, @id))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
alias remove unset
|
alias remove unset
|
||||||
|
@ -2302,7 +2302,7 @@ class TkVarAccess<TkVariable
|
||||||
TkVar_ID_TBL[@id] = self
|
TkVar_ID_TBL[@id] = self
|
||||||
if val
|
if val
|
||||||
s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' #"
|
s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' #"
|
||||||
INTERP._eval(format('global %s; set %s %s', @id, @id, s))
|
INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -3919,8 +3919,9 @@ class TkObject<TkKernel
|
||||||
|
|
||||||
def tk_trace_variable(v)
|
def tk_trace_variable(v)
|
||||||
unless v.kind_of?(TkVariable)
|
unless v.kind_of?(TkVariable)
|
||||||
fail ArgumentError,
|
fail(ArgumentError,
|
||||||
format("type error (%s); must be TkVariable object", v.class)
|
Kernel.format("type error (%s); must be TkVariable object",
|
||||||
|
v.class))
|
||||||
end
|
end
|
||||||
v
|
v
|
||||||
end
|
end
|
||||||
|
@ -5547,7 +5548,7 @@ module TkSystemMenu
|
||||||
unless parent.kind_of? TkMenu
|
unless parent.kind_of? TkMenu
|
||||||
fail ArgumentError, "parent must be a TkMenu object"
|
fail ArgumentError, "parent must be a TkMenu object"
|
||||||
end
|
end
|
||||||
@path = format("%s.%s", parent.path, self.class::SYSMENU_NAME)
|
@path = Kernel.format("%s.%s", parent.path, self.class::SYSMENU_NAME)
|
||||||
#TkComm::Tk_WINDOWS[@path] = self
|
#TkComm::Tk_WINDOWS[@path] = self
|
||||||
TkCore::INTERP.tk_windows[@path] = self
|
TkCore::INTERP.tk_windows[@path] = self
|
||||||
if self.method(:create_self).arity == 0
|
if self.method(:create_self).arity == 0
|
||||||
|
|
|
@ -193,7 +193,7 @@ class TkTimer
|
||||||
def set_procs(interval, loop_exec, *procs)
|
def set_procs(interval, loop_exec, *procs)
|
||||||
if !interval == 'idle' \
|
if !interval == 'idle' \
|
||||||
&& !interval.kind_of?(Integer) && !interval.kind_of?(Proc)
|
&& !interval.kind_of?(Integer) && !interval.kind_of?(Proc)
|
||||||
fail format("%s need to be Integer or Proc", interval.inspect)
|
fail Kernel.format("%s need to be Integer or Proc", interval.inspect)
|
||||||
end
|
end
|
||||||
@sleep_time = interval
|
@sleep_time = interval
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ class TkTimer
|
||||||
@loop_exec = 1
|
@loop_exec = 1
|
||||||
else
|
else
|
||||||
if not loop_exec.kind_of?(Integer)
|
if not loop_exec.kind_of?(Integer)
|
||||||
fail format("%s need to be Integer", loop_exec.inspect)
|
fail Kernel.format("%s need to be Integer", loop_exec.inspect)
|
||||||
end
|
end
|
||||||
@loop_exec = loop_exec
|
@loop_exec = loop_exec
|
||||||
end
|
end
|
||||||
|
@ -263,7 +263,7 @@ class TkTimer
|
||||||
|
|
||||||
def set_start_proc(sleep, init_proc, *init_args)
|
def set_start_proc(sleep, init_proc, *init_args)
|
||||||
if !sleep == 'idle' && !sleep.kind_of?(Integer)
|
if !sleep == 'idle' && !sleep.kind_of?(Integer)
|
||||||
fail format("%s need to be Integer", sleep.inspect)
|
fail Kernel.format("%s need to be Integer", sleep.inspect)
|
||||||
end
|
end
|
||||||
@init_sleep = sleep
|
@init_sleep = sleep
|
||||||
@init_proc = init_proc
|
@init_proc = init_proc
|
||||||
|
@ -282,7 +282,7 @@ class TkTimer
|
||||||
if argc > 0
|
if argc > 0
|
||||||
sleep = init_args.shift
|
sleep = init_args.shift
|
||||||
if !sleep == 'idle' && !sleep.kind_of?(Integer)
|
if !sleep == 'idle' && !sleep.kind_of?(Integer)
|
||||||
fail format("%s need to be Integer", sleep.inspect)
|
fail Kernel.format("%s need to be Integer", sleep.inspect)
|
||||||
end
|
end
|
||||||
@init_sleep = sleep
|
@init_sleep = sleep
|
||||||
end
|
end
|
||||||
|
@ -293,7 +293,7 @@ class TkTimer
|
||||||
@running = true
|
@running = true
|
||||||
if @init_proc
|
if @init_proc
|
||||||
if not @init_proc.kind_of? Proc
|
if not @init_proc.kind_of? Proc
|
||||||
fail format("%s need to be Proc", @init_proc.inspect)
|
fail Kernel.format("%s need to be Proc", @init_proc.inspect)
|
||||||
end
|
end
|
||||||
@current_proc = @init_proc
|
@current_proc = @init_proc
|
||||||
set_callback(@init_sleep, @init_args)
|
set_callback(@init_sleep, @init_args)
|
||||||
|
@ -346,7 +346,7 @@ class TkTimer
|
||||||
fail RuntimeError, "no procedure to continue" unless cmd
|
fail RuntimeError, "no procedure to continue" unless cmd
|
||||||
if wait
|
if wait
|
||||||
if not wait.kind_of? Integer
|
if not wait.kind_of? Integer
|
||||||
fail RuntimeError, format("%s need to be Integer", wait.inspect)
|
fail RuntimeError, Kernel.format("%s need to be Integer", wait.inspect)
|
||||||
end
|
end
|
||||||
sleep = wait
|
sleep = wait
|
||||||
end
|
end
|
||||||
|
|
|
@ -569,7 +569,7 @@ class TkcTag<TkObject
|
||||||
|
|
||||||
def initialize(parent, mode=nil, *args)
|
def initialize(parent, mode=nil, *args)
|
||||||
if not parent.kind_of?(TkCanvas)
|
if not parent.kind_of?(TkCanvas)
|
||||||
fail format("%s need to be TkCanvas", parent.inspect)
|
fail Kernel.format("%s need to be TkCanvas", parent.inspect)
|
||||||
end
|
end
|
||||||
@c = parent
|
@c = parent
|
||||||
@cpath = parent.path
|
@cpath = parent.path
|
||||||
|
@ -647,7 +647,7 @@ class TkcTagString<TkcTag
|
||||||
|
|
||||||
def initialize(parent, name, mode=nil, *args)
|
def initialize(parent, name, mode=nil, *args)
|
||||||
if not parent.kind_of?(TkCanvas)
|
if not parent.kind_of?(TkCanvas)
|
||||||
fail format("%s need to be TkCanvas", parent.inspect)
|
fail Kernel.format("%s need to be TkCanvas", parent.inspect)
|
||||||
end
|
end
|
||||||
@c = parent
|
@c = parent
|
||||||
@cpath = parent.path
|
@cpath = parent.path
|
||||||
|
@ -664,7 +664,7 @@ TkcNamedTag = TkcTagString
|
||||||
class TkcTagAll<TkcTag
|
class TkcTagAll<TkcTag
|
||||||
def initialize(parent)
|
def initialize(parent)
|
||||||
if not parent.kind_of?(TkCanvas)
|
if not parent.kind_of?(TkCanvas)
|
||||||
fail format("%s need to be TkCanvas", parent.inspect)
|
fail Kernel.format("%s need to be TkCanvas", parent.inspect)
|
||||||
end
|
end
|
||||||
@c = parent
|
@c = parent
|
||||||
@cpath = parent.path
|
@cpath = parent.path
|
||||||
|
@ -677,7 +677,7 @@ end
|
||||||
class TkcTagCurrent<TkcTag
|
class TkcTagCurrent<TkcTag
|
||||||
def initialize(parent)
|
def initialize(parent)
|
||||||
if not parent.kind_of?(TkCanvas)
|
if not parent.kind_of?(TkCanvas)
|
||||||
fail format("%s need to be TkCanvas", parent.inspect)
|
fail Kernel.format("%s need to be TkCanvas", parent.inspect)
|
||||||
end
|
end
|
||||||
@c = parent
|
@c = parent
|
||||||
@cpath = parent.path
|
@cpath = parent.path
|
||||||
|
@ -691,7 +691,7 @@ class TkcGroup<TkcTag
|
||||||
Tk_cGroup_ID = ['tkcg'.freeze, '00000'.taint].freeze
|
Tk_cGroup_ID = ['tkcg'.freeze, '00000'.taint].freeze
|
||||||
def create_self(parent, *args)
|
def create_self(parent, *args)
|
||||||
if not parent.kind_of?(TkCanvas)
|
if not parent.kind_of?(TkCanvas)
|
||||||
fail format("%s need to be TkCanvas", parent.inspect)
|
fail Kernel.format("%s need to be TkCanvas", parent.inspect)
|
||||||
end
|
end
|
||||||
@c = parent
|
@c = parent
|
||||||
@cpath = parent.path
|
@cpath = parent.path
|
||||||
|
@ -737,7 +737,7 @@ class TkcItem<TkObject
|
||||||
|
|
||||||
def initialize(parent, *args)
|
def initialize(parent, *args)
|
||||||
if not parent.kind_of?(TkCanvas)
|
if not parent.kind_of?(TkCanvas)
|
||||||
fail format("%s need to be TkCanvas", parent.inspect)
|
fail Kernel.format("%s need to be TkCanvas", parent.inspect)
|
||||||
end
|
end
|
||||||
@parent = @c = parent
|
@parent = @c = parent
|
||||||
@path = parent.path
|
@path = parent.path
|
||||||
|
|
|
@ -18,8 +18,8 @@ class TkDialog2 < TkWindow
|
||||||
"to the dialog button#{i}. It was removed.\n")
|
"to the dialog button#{i}. It was removed.\n")
|
||||||
end
|
end
|
||||||
c.delete('command'); c.delete(:command)
|
c.delete('command'); c.delete(:command)
|
||||||
@config << format("%s.button%s configure %s; ",
|
@config << Kernel.format("%s.button%s configure %s; ",
|
||||||
@path, i, hash_kv(c).join(' '))
|
@path, i, hash_kv(c).join(' '))
|
||||||
}
|
}
|
||||||
case configs
|
case configs
|
||||||
when Proc
|
when Proc
|
||||||
|
@ -114,23 +114,23 @@ class TkDialog2 < TkWindow
|
||||||
}
|
}
|
||||||
|
|
||||||
if @message_config.kind_of? Hash
|
if @message_config.kind_of? Hash
|
||||||
@config << format("%s.msg configure %s;",
|
@config << Kernel.format("%s.msg configure %s;",
|
||||||
@path, hash_kv(@message_config).join(' '))
|
@path, hash_kv(@message_config).join(' '))
|
||||||
end
|
end
|
||||||
|
|
||||||
if @msgframe_config.kind_of? Hash
|
if @msgframe_config.kind_of? Hash
|
||||||
@config << format("%s.top configure %s;",
|
@config << Kernel.format("%s.top configure %s;",
|
||||||
@path, hash_kv(@msgframe_config).join(' '))
|
@path, hash_kv(@msgframe_config).join(' '))
|
||||||
end
|
end
|
||||||
|
|
||||||
if @btnframe_config.kind_of? Hash
|
if @btnframe_config.kind_of? Hash
|
||||||
@config << format("%s.bot configure %s;",
|
@config << Kernel.format("%s.bot configure %s;",
|
||||||
@path, hash_kv(@btnframe_config).join(' '))
|
@path, hash_kv(@btnframe_config).join(' '))
|
||||||
end
|
end
|
||||||
|
|
||||||
if @bitmap_config.kind_of? Hash
|
if @bitmap_config.kind_of? Hash
|
||||||
@config << format("%s.bitmap configure %s;",
|
@config << Kernel.format("%s.bitmap configure %s;",
|
||||||
@path, hash_kv(@bitmap_config).join(' '))
|
@path, hash_kv(@bitmap_config).join(' '))
|
||||||
end
|
end
|
||||||
|
|
||||||
_set_button_config(@button_configs) if @button_configs
|
_set_button_config(@button_configs) if @button_configs
|
||||||
|
|
|
@ -834,7 +834,7 @@ class TkTextTag<TkObject
|
||||||
|
|
||||||
def initialize(parent, *args)
|
def initialize(parent, *args)
|
||||||
if not parent.kind_of?(TkText)
|
if not parent.kind_of?(TkText)
|
||||||
fail format("%s need to be TkText", parent.inspect)
|
fail Kernel.format("%s need to be TkText", parent.inspect)
|
||||||
end
|
end
|
||||||
@parent = @t = parent
|
@parent = @t = parent
|
||||||
@tpath = parent.path
|
@tpath = parent.path
|
||||||
|
@ -1006,7 +1006,7 @@ class TkTextNamedTag<TkTextTag
|
||||||
|
|
||||||
def initialize(parent, name, *args)
|
def initialize(parent, name, *args)
|
||||||
if not parent.kind_of?(TkText)
|
if not parent.kind_of?(TkText)
|
||||||
fail format("%s need to be TkText", parent.inspect)
|
fail Kernel.format("%s need to be TkText", parent.inspect)
|
||||||
end
|
end
|
||||||
@parent = @t = parent
|
@parent = @t = parent
|
||||||
@tpath = parent.path
|
@tpath = parent.path
|
||||||
|
@ -1050,7 +1050,7 @@ class TkTextMark<TkObject
|
||||||
|
|
||||||
def initialize(parent, index)
|
def initialize(parent, index)
|
||||||
if not parent.kind_of?(TkText)
|
if not parent.kind_of?(TkText)
|
||||||
fail format("%s need to be TkText", parent.inspect)
|
fail Kernel.format("%s need to be TkText", parent.inspect)
|
||||||
end
|
end
|
||||||
@parent = @t = parent
|
@parent = @t = parent
|
||||||
@tpath = parent.path
|
@tpath = parent.path
|
||||||
|
@ -1122,7 +1122,7 @@ class TkTextNamedMark<TkTextMark
|
||||||
|
|
||||||
def initialize(parent, name, index=nil)
|
def initialize(parent, name, index=nil)
|
||||||
if not parent.kind_of?(TkText)
|
if not parent.kind_of?(TkText)
|
||||||
fail format("%s need to be TkText", parent.inspect)
|
fail Kernel.format("%s need to be TkText", parent.inspect)
|
||||||
end
|
end
|
||||||
@parent = @t = parent
|
@parent = @t = parent
|
||||||
@tpath = parent.path
|
@tpath = parent.path
|
||||||
|
@ -1156,7 +1156,7 @@ end
|
||||||
class TkTextWindow<TkObject
|
class TkTextWindow<TkObject
|
||||||
def initialize(parent, index, keys)
|
def initialize(parent, index, keys)
|
||||||
if not parent.kind_of?(TkText)
|
if not parent.kind_of?(TkText)
|
||||||
fail format("%s need to be TkText", parent.inspect)
|
fail Kernel.format("%s need to be TkText", parent.inspect)
|
||||||
end
|
end
|
||||||
@t = parent
|
@t = parent
|
||||||
if index == 'end'
|
if index == 'end'
|
||||||
|
@ -1245,7 +1245,7 @@ end
|
||||||
class TkTextImage<TkObject
|
class TkTextImage<TkObject
|
||||||
def initialize(parent, index, keys)
|
def initialize(parent, index, keys)
|
||||||
if not parent.kind_of?(TkText)
|
if not parent.kind_of?(TkText)
|
||||||
fail format("%s need to be TkText", parent.inspect)
|
fail Kernel.format("%s need to be TkText", parent.inspect)
|
||||||
end
|
end
|
||||||
@t = parent
|
@t = parent
|
||||||
if index == 'end'
|
if index == 'end'
|
||||||
|
|
Loading…
Add table
Reference in a new issue