$gLast_id=$tree->insert($gLast_id, "end", -text => "some_text" ); $tree->item($gLast_id, -open => "true"); #$tree->focus($gLast_id); __END__ Can't call method "insert" on an undefined value at - line 1.