【问题标题】:Flex Mobile, Get Value data from SpinnerListFlex Mobile,从 SpinnerList 获取价值数据
【发布时间】:2013-05-03 04:17:12
【问题描述】:

当我使用第一个代码时,它可以工作,将值返回给我。但是,如果我改变了

list="{new ArrayList(['test1','test2'])}"

list="{Operation1Result2.lastResult}

返回值就像 [object songvoting]


protected function spinnerList_changeHandler(event:IndexChangeEvent):void
        {               
            Debug.text  = event.currentTarget.selectedItem;
        }

<s:SpinnerListContainer includeIn="vote" x="10" y="100" width="640" height="446">
    <s:SpinnerList id="spinnerList" width="636" height="443"
                   creationComplete="spinnerList_creationCompleteHandler(event)"
                   labelField="song" selectedIndex="1" textAlign="center"
                   change="spinnerList_changeHandler(event)">                   
        <s:AsyncListView list="{new ArrayList(['test1','test2'])}"/>            
    </s:SpinnerList>
</s:SpinnerListContainer>

【问题讨论】:

    标签: apache-flex mobile


    【解决方案1】:

    “Operation1Result2.lastResult”的值是多少?对我来说,这看起来像一个单一的对象,而不是一个 IList。

    【讨论】:

    • 这是获取 http-json 的服务,微调器工作正常,把微调器列表上的所有东西都给了我。
    • label.text = Operation1Result2.lastResult 输出就像 [object blabla],[object balbala],[object blalaa]
    • list="{Operation1Result2.lastResult}" 或 dataProviderlist="{Operation1Result2.lastResult}" 在 Spinnerlist/ColumnChart 上它将返回 Spinnerlist/ColumnChart 上的值
    • 所以,如果我理解正确,“Operation1Result2.lastResult”返回一个歌曲投票对象的 IList,而 new ArrayList(['test1','test2']) 只是一个字符串的 IList,对?
    • 是的,所以 spinnerlist 上的数据来自 http-jon。哦,我只是通过将 Debug.text = event.currentTarget.selectedItem 更改为 Debug.text = spinnerList..selectedItem.song 来发现我的代码有效;
    猜你喜欢
    • 1970-01-01
    • 2016-10-29
    • 1970-01-01
    • 1970-01-01
    • 2018-10-08
    • 2015-06-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多