Apache flex 如何使皮肤了解hostComponent';谁的财产?
我正在写一个组件和它的皮肤。蒙皮有一个Apache flex 如何使皮肤了解hostComponent';谁的财产?,apache-flex,flex4.5,skinning,flex-spark,Apache Flex,Flex4.5,Skinning,Flex Spark,我正在写一个组件和它的皮肤。蒙皮有一个“selected”状态,在该状态下,它使用相应的光晕渲染对象。 此时,正在选择的状态被保存在hostComponent中的属性中,该属性由外部设置/取消设置(而不是通过皮肤上的直接用户交互) 我尝试将hostComponent的boolean属性设置为SkinPart,并在皮肤初始化时在此属性上设置一个ChangeWatcher,以触发状态更改。不要抽雪茄( 通过hostComponent,如何改变皮肤的状态 What's the way to make
“selected”
状态,在该状态下,它使用相应的光晕渲染对象。
此时,正在选择的状态被保存在hostComponent
中的属性中,该属性由外部设置/取消设置(而不是通过皮肤上的直接用户交互)
我尝试将hostComponent
的boolean
属性设置为SkinPart
,并在皮肤初始化时在此属性上设置一个ChangeWatcher
,以触发状态更改。不要抽雪茄(
通过hostComponent
,如何改变皮肤的状态
What's the way to make the skin's state change through the hostComponent?
在hostComponent的属性中调用invalidateSkinState()
这将反过来强制commitProperties在下一个呈现事件期间重新运行,从而在commitProperties运行时强制getCurrentSkinState()重新运行
确保hostComponent实现getCurrentSkinState(),并返回表示要转到的状态的字符串值