begin¶ ↑
def TkBindTag.new_by_name(name, *args, &b)
BTagID_TBL.mutex.synchronize{
return BTagID_TBL[name] if BTagID_TBL[name]
}
self.new.instance_eval{
BTagID_TBL.mutex.synchronize{
BTagID_TBL.delete @id
@id = name
BTagID_TBL[@id] = self
}
bind(*args, &b) if args != []
self
}
end
def TkBindTag.new_by_name(name, *args, &b)
obj = nil
BTagID_TBL.mutex.synchronize{
if BTagID_TBL[name]
obj = BTagID_TBL[name]
else
(obj = BTagID_TBL[name] = self.allocate).instance_eval{
@id = name
}
end
}
bind(*args, &b) if obj && args != []
obj
end