Closed chrischyi closed 3 years ago
现版本先super.removeChildAt(),dispose为true时会导致child._node被置null,下面child.off报错 修改为 public removeChildAt(index: number, dispose?: boolean): GObject { var child: GObject = this.getChildAt(index); child.off(Event.CLICK, this.onClickItem, this); super.removeChildAt(index, dispose); return child; }
ok
https://github.com/fairygui/FairyGUI-cocoscreator/commit/7e64115e757e4a91ff319437969abadcf1690068
现版本先super.removeChildAt(),dispose为true时会导致child._node被置null,下面child.off报错 修改为 public removeChildAt(index: number, dispose?: boolean): GObject { var child: GObject = this.getChildAt(index); child.off(Event.CLICK, this.onClickItem, this); super.removeChildAt(index, dispose); return child; }