如何判断SkinnableComponent是否已经完成添加部件?
美好的一天,
有谁知道是否有办法确定何时添加 SkinnableComponent 对象的所有部分?这个问题的背景如下:
我有一个自定义的可换肤组件类,一旦创建它就需要更新它的一些部分(例如更改一些标签),这意味着一旦所有皮肤部分都已实例化和添加。
提前致谢,
Good day,
Does anyone know if there is a way to determine when all the parts of a SkinnableComponent object have been added? The context of this problem is the following:
I have a custom skinnable component class which needs to update some of its parts (e.g. change some labels) once it has been created, meaning once all the skin parts have been instantiated and added.
Thanks in advance,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
常见的解决方案是重写
partAdded(partName:String, instance:Object):void
并在创建部件时对其进行修改。The common solution is to override
partAdded(partName:String, instance:Object):void
and to modify the parts when they are created.