2012-03-10 2 views
0

어떤 이유로이 기능을 사용할 수 없습니다. 어떤 도움이라도 대단히 감사하겠습니다.배열이 작동하지 않는 dropDownList

<fx:Declarations> 
<s:ArrayList id="mathChoices"> 
<fx:String>ADD</fx:String> 
<fx:String>SUBTRACT</fx:String> 
<fx:String>MULTIPLY</fx:String> 
<fx:String>DIVIDE</fx:String> 
</s:ArrayList> 

</fx:Declarations> 

그리고 나중에 :

<s:DropDownList id="math_selector" includeIn="Intro" x="49" y="241" dataProvider="mathChoices" 
       prompt="Pick from..." requireSelection="true"></s:DropDownList> 

그것은 나에게이 오류 제공 :

Initializer for 'dataProvider': values of type mx.collections.IList cannot be represented in text.

그래서 내가 무슨 짓을?

미리 감사드립니다. 더 많은 코드가 필요한 경우 알려 주시기 바랍니다.

답변

0
Edit your dataprovider as {mathChoices as IList} 

    here is the code. 

    <s:DropDownList id="math_selector" x="49" y="241" 
    dataProvider="{mathChoices as IList}"     
    prompt="Pick from..." requireSelection="true"> 
    </s:DropDownList> 
+0

SWEET! 감사!! – nebmuzik

+0

@nebmuzik, 환영합니다. –

관련 문제