----
require "phi"
form = Phi::Form.new
places = Phi::TreeView.new form, :places
mainnode = places.items.add(nil, "nub_1")
newnode = places.items.add_child(mainnode, "nub_2")
newnode.data = "this is my data"
p [mainnode.first_child.data, mainnode.first_child]
p [mainnode.first_child.data, mainnode.first_child]
mainnode.first_child.owner # <= This causes ilegal
effect
p [mainnode.first_child.data, mainnode.first_child] #
<= "mainnode.first_child" returns different object!
=begin
["this is my data", #<Phi::TreeNode:0x17543b8>]
["this is my data", #<Phi::TreeNode:0x17543b8>]
[nil, #<Phi::TreeNode:0x1754160>] # <=
"mainnode.first_child" returns different object!
=end
----
require "phi"
form = Phi::Form.new
places = Phi::TreeView.new form, :places
mainnode = places.items.add(nil, "nub_1")
newnode = places.items.add_child(mainnode, "nub_2")
newnode.data = "this is my data"
p [mainnode.first_child.data, mainnode.first_child]
p [mainnode.first_child.data, mainnode.first_child]
mainnode.first_child.owner # <= This causes ilegal
effect
p [mainnode.first_child.data, mainnode.first_child] #
<= "mainnode.first_child" returns different object!
=begin
["this is my data", #<Phi::TreeNode:0x17543b8>]
["this is my data", #<Phi::TreeNode:0x17543b8>]
[nil, #<Phi::TreeNode:0x1754160>] # <=
"mainnode.first_child" returns different object!
=end
----