Am I losing my mind? I use the following code to change the default behavior of the Treeview control to get the behavior the designers want when a child is removed from a tree:
* BEGIN FRMTREEVIEW.GETNODETOSELECT()
* Description: A valid node associated with the Tree to be manipulated.
* Parameters: -
* Returns:
* Notes: 1.
* 2.
* Revisions: 12/16/1998 - MWT
* - Created
lParameters toNode
if (VarType(toNode.next) == "O")
if (NOT isNull(toNode.next))
if (VarType(toNode.next.Selected) == "L")
toNode.Next.Selected = .T.
Wait clear
return
endif
endif
endif
if (VarType(toNode.Previous) == "O")
if (NOT isNull(toNode.Previous))
if (VarType(toNode.Previous.Selected) == "L")
toNode.Previous.Selected = .T.
Wait clear
return
endif
endif
endif
if (VarType(toNode.parent) == "O")
if (NOT isNull(toNode.parent))
if (VarType(toNode.Parent.Selected) == "L")
toNode.Parent.Selected = .T.
endif
endif
endif
* END FRMTREEVIEW.GETNODETOSELECT()
This code is called before a node is removed from a tree. After deleting some number of nodes from a tree (from 2 - 27 in testing), any of the instructions toNode.????.Selected = .T. generates a
"Member ????? does not equate to an object." What other tests of a node can I make? The default behavior of deleting the last child on a node is to select the Parent node, instead of our desired previous node.
Any assistance would be GREATLY APPRECIATED.
Mike
Mike