加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex 学习笔记 hostcomponent

发布时间:2020-12-15 04:57:59 所属栏目:百科 来源:网络整理
导读:错误:ReferenceError: Error #1069: 在 skin.TextAreaSkin 上找不到属性 hostComponent,且没有默认值。 原因:由于在皮肤文件里面没有设置 hostComponent,并且也没有在皮肤文件里面设置 focusSkinExclusions 导致 ? ? 由于我删除了所有自动生成的as代码,

错误:ReferenceError: Error #1069: 在 skin.TextAreaSkin 上找不到属性 hostComponent,且没有默认值。

原因:由于在皮肤文件里面没有设置 hostComponent,并且也没有在皮肤文件里面设置 focusSkinExclusions 导致
?

?

由于我删除了所有自动生成的as代码,且删除了Metadata标签以及里面的[HostComponent("spark.components.TextArea")]

所以 但点击组件的时候,下面的方法

public function endHighlightBitmapCapture():Boolean
{
var exclusions:Array = focusSkinExclusions;
if (!exclusions)
{
if (this["hostComponent"] is SkinnableComponent)
exclusions = SkinnableComponent(this["hostComponent"]).suggestedFocusSkinExclusions;
}
?出错。

解决:

加上hostComponent或者在皮肤文件里面定义 focusSkinExclusions。

?

hostcomponent? 该属性不是必需的,但建议使用。hostComponent 属性必须与使用外观的组件属于同一类型。可以使用主机组件来访问外观所连组件的属性和方法。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读