Code Improvement - Shapes not being set to Nill
Posted: Thu Dec 11, 2008 5:28 pm
When the TCustomTree.Clear is called, it is only freeing the shape, and not setting them to nil.
Could you please include the following change in your next code release.
TeeTree.pas
- TCustomTree.Clear
// 9th line from the Procedure Decleration
//Previous Code
for t:=0 to Shapes.Count-1 do Shapes[t].Free;
//Change To
for t:=0 to Shapes.Count-1 do Shapes.FreeAndNillItem(t);
This will fix some problems I have been having when checking if a shape is assigned.
Could you please include the following change in your next code release.
TeeTree.pas
- TCustomTree.Clear
// 9th line from the Procedure Decleration
//Previous Code
for t:=0 to Shapes.Count-1 do Shapes[t].Free;
//Change To
for t:=0 to Shapes.Count-1 do Shapes.FreeAndNillItem(t);
This will fix some problems I have been having when checking if a shape is assigned.