# File tk/lib/tkextlib/tile/treeview.rb, line 901 def self.new(tree, keys = {}) tpath = tree.path obj = nil Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ if Tk::Tile::Treeview::Item::ItemID_TBL[tpath] && Tk::Tile::Treeview::Item::ItemID_TBL[tpath][''] obj = Tk::Tile::Treeview::Item::ItemID_TBL[tpath][''] else #super(tree, keys) (obj = self.allocate).instance_eval{ @parent = @t = tree @tpath = tree.path @path = @id = '' Tk::Tile::Treeview::Item::ItemID_TBL[@tpath] ||= {} Tk::Tile::Treeview::Item::ItemID_TBL[@tpath][@id] = self } end } obj.configure(keys) if keys && ! keys.empty? obj end
# File tk/lib/tkextlib/tile/treeview.rb, line 923 def initialize(tree, keys = {}) # dummy:: not called by 'new' method @parent = @t = tree @tpath = tree.path @path = @id = '' Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ Tk::Tile::Treeview::Item::ItemID_TBL[@tpath] ||= {} Tk::Tile::Treeview::Item::ItemID_TBL[@tpath][@id] = self } end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.