fairygui / FairyGUI-cocoscreator

A flexible UI framework for Cocos Creator
MIT License
548 stars 193 forks source link

GList.removeChildAt #47

Closed chrischyi closed 3 years ago

chrischyi commented 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; }

xiaoguzhu commented 3 years ago

ok

xiaoguzhu commented 3 years ago

https://github.com/fairygui/FairyGUI-cocoscreator/commit/7e64115e757e4a91ff319437969abadcf1690068