2

我在名为 uiComponents 的包中有一个自定义 CalloutButton 组件。这个自定义的 CallOutButton 是必需的,因为我需要更多的属性。

这个 CalloutButton 像往常一样被添加到我的 MXML 中;

     <uiComponents:MyCustomCalloutButton someproperties here >

     </uiComponents:My...>

现在,随附的 s:calloutContent 出现编译错误,(几乎标准)无法解决...

自然地,命名空间已经被导入

我在这里想念什么?这让我发疯了一个多小时。任何帮助将不胜感激!

干杯!

4

1 回答 1

2

由于错误是从s:calloutContent标签生成的;不是uiComponents:MyCustomCallOutButton标签;解决方案是,在许多情况下,封闭标记必须使用与其父级相同的命名空间,因此将其替换为uiComponents:calloutContent

所以代替这个:

 <uiComponents:MyCustomCalloutButton someproperties here >
     <s:calloutContent />
 </uiComponents:My...>

你需要这样做:

 <uiComponents:MyCustomCalloutButton someproperties here >
     <uiComponents:calloutContent />
 </uiComponents:My...>
于 2012-01-25T16:04:57.770 回答