def self.new(parent, name, *args)
obj = nil
SliceID_TBL.mutex.synchronize{
if SliceID_TBL[parent.path] && SliceID_TBL[parent.path][name]
obj = SliceID_TBL[parent.path][name]
else
unless parent.kind_of?(Tk::Vu::Pie)
fail ArgumentError, "expect a Tk::Vu::Pie instance for 1st argument"
end
obj = self.allocate
obj.instance_eval{
@parent = @pie = parent
@ppath = parent.path
@path = @id = name.to_s
SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath]
SliceID_TBL[@ppath][@id] = self
}
end
}
obj.instance_eval{
if args[-1].kind_of?(Hash)
keys = args.unshift
end
@pie.set(@id, *args)
configure(keys)
}
obj
end