479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
|
# File 'lib/tkextlib/blt/tree.rb', line 479
def self.id2obj(tree, id)
tpath = tree.path
TraceID_TBL.mutex.synchronize{
if TraceID_TBL[tpath]
if TraceID_TBL[tpath][id]
TraceID_TBL[tpath][id]
else
begin
(obj = self.allocate).instance_eval{
@parent = @tree = tree
@tpath = @parent.path
@path = @id = node TraceID_TBL[@tpath] ||= {}
TraceID_TBL[@tpath][@id] = self
}
obj
rescue
id
end
end
else
id
end
}
end
|