是否有简单明了的方法来确定是否删除了treenode?一个属性或函数一致为nil,-1,false左右?
// tn:ttreenode; tvyu:ttreeview;
tn:=tvyu.items[4]; // tn is nothing but a pointer, i guess
// do something including:
tvyu.items[4].delete; // this probably does free some memory
// do something then check if tn was deleted
if (tn.absoluteindex=0) and (tn<>tvyu.items[0]) then ... // this works at first glance but
// i guess tn just points to a zero randomly and i can`t rely on it
我可以检查所有这种类型的变量,如果它们匹配则在删除事件中将它们取消,只是想知道是否有更简单的方法。