Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex Flex:repeater项作为数组索引(绑定)_Apache Flex - Fatal编程技术网

Apache flex Flex:repeater项作为数组索引(绑定)

Apache flex Flex:repeater项作为数组索引(绑定),apache-flex,Apache Flex,我在转发器(rptInfos)中有一个标签,我有一个包含翻译的arraycollection(文本)。当我更改语言时,“文本”内容会发生变化,通常我会使用{text.getItemAt(219}}}例如,当我需要翻译文本时。但是在repeater中,我有一个可翻译的列,所以我想这样使用它: <s:Label text="{Texts.getItemAt(rptInfos.currentItem.DictID as int)}" /> 但是它说“语法错误:在属性后面应该有一个定义

我在转发器(rptInfos)中有一个标签,我有一个包含翻译的arraycollection(文本)。当我更改语言时,“文本”内容会发生变化,通常我会使用{text.getItemAt(219}}}例如,当我需要翻译文本时。但是在repeater中,我有一个可翻译的列,所以我想这样使用它:

<s:Label text="{Texts.getItemAt(rptInfos.currentItem.DictID as int)}" />

但是它说“语法错误:在属性后面应该有一个定义关键字(如function),而不是target”
我想在labels creationComplete事件中翻译它,但是我可以忘记绑定,因此只有在重新加载时,我才能更新内容。

这只是一个猜测:试试看

<s:Label text="{Texts.getItemAt(Number(rptInfos.currentItem.DictID))}" />

A不太好,但有效的解决方案:S

                            <s:Label text="{rptInfos.currentItem.DictID==254?Texts.getItemAt(254):
                                 rptInfos.currentItem.DictID==255?Texts.getItemAt(255):
                                 rptInfos.currentItem.DictID==256?Texts.getItemAt(256):
                                 rptInfos.currentItem.DictID==257?Texts.getItemAt(257):
                                 rptInfos.currentItem.DictID==258?Texts.getItemAt(258):
                                 rptInfos.currentItem.DictID==259?Texts.getItemAt(259):''}" />

Description资源路径位置类型语法错误:在rightparen之前需要标识符。[生成的代码(使用-keep保存):路径:\u CC\u Components\u RequestsWatcherSetupUtil.as,第0行,第0列]technoWebShop未知Flex问题描述资源路径位置类型语法错误:在目标之前需要rightparen。[生成的代码(使用-keep保存):路径:_CC_Components_requestswatcherstuputil.as,行:0,列:0]technoWebShop未知FlexProblem@SteMa就