-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addChild的时候添加校验 #602
Comments
这个不大可能,破坏性太强,有同名的抛异常倒可以考虑 |
目前的做法也是强制替换(容易埋坑),只是之前的还在队列里面,这样children看起来很奇怪...
|
目前的做法虽然会引起 所以为了不坑,通过抛异常的方式告知这里出现了问题似乎是个办法 |
同名的时候,不对control做任何操作(不添加,不替换),直接抛一个异常,类似于这样的处理? |
是的,直接就不渲染了,这样至少写代码的人能发现错误去改正 hunter2009 [email protected]于2016年7月15日 周五下午3:47写道:
|
+1 |
addChild能不能添加对childName的校验,如果存在同名子control就删除掉之前的,然后再添加新的?
The text was updated successfully, but these errors were encountered: