# File tk/lib/tkextlib/tktable/tktable.rb, line 227 def self.new(parent, name, keys=nil) obj = nil CellTagID_TBL.mutex.synchronize{ if CellTagID_TBL[parent.path] && CellTagID_TBL[parent.path][name] obj = CellTagID_TBL[parent.path][name] else #super(parent, name, keys) (obj = self.allocate).instance_eval{ @parent = @t = parent @tpath = parent.path @path = @id = name CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath] CellTagID_TBL[@tpath][@id] = self } end } obj.configure(keys) if keys && ! keys.empty? obj end
# File tk/lib/tkextlib/tktable/tktable.rb, line 247 def initialize(parent, name, keys=nil) # dummy:: not called by 'new' method @parent = @t = parent @tpath = parent.path @path = @id = name CellTagID_TBL.mutex.synchronize{ CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath] CellTagID_TBL[@tpath][@id] = self } configure(keys) if keys && ! keys.empty? end