XML 질문 편집기를 플래시로 만들려고합니다. 는 기본적으로 나는 Tree 구성 요소에 XML에로드 - XML을과 같이 :플렉스 - 트리에서 리피터로 데이터 바인딩
<questions>
<question id="1" type="radio" text="This is question 1" isBranch="true">
<option id="1.1" correct="false" text="This is option 1" />
<option id="1.2" correct="false" text="This is option 2" />
<option id="1.1" correct="false" text="This is option 1" />
<option id="1.2" correct="false" text="This is option 2" />
<option id="1.3" correct="true" text="This is option 3" />
<option id="1.4" correct="false" text="This is option 4" />
</question>
<question id="2" type="check" text="This is question 2" isBranch="true">
<option id="2.1" correct="true" text="This is option 1" />
<option id="2.2" correct="false" text="This is option 2" />
<option id="2.3" correct="true" text="This is option 3" />
</question>
</questions>
은 그래서 나무로 들어갑니다. 변경하면 선택한 질문 (item..option)에 대한 옵션 목록이 표시되고 XMLList는 (사용자 정의) 구성 요소로 전달됩니다. 해당 구성 요소 (이 방법이 가장 좋은 방법인지 확실하지 않지만 여전히 ...) - 몇 가지 Repeater 컨트롤이 있습니다. 하나는 라디오 질문에 대한 XMLList에 바인딩되고 다른 하나는 XMLList에 바인딩됩니다. 확인란 질문. 각 리피터는 옵션 수를 반복하고 옵션 텍스트를 편집하기 위해 TextInput을 입력하고 라디오 나 확인란을 선택합니다 (질문 유형에 따라 다름)
그래서 내가 편집 한 텍스트는 옵션의 경우, 그 TextInput의 XML는 트리의 dataProvider 인 XML에 바인드됩니다. 예를 들어, "This is option Foo"로 "This is option 1"을 변경하면 트리가 업데이트됩니다. (. 예를 들어 라디오에 대한)
지금까지 내 중계기이
<mx:Repeater id="repeaterRadio" dataProvider="{optionsListRadio}">
<mx:TextInput width="359" id="radioText"
editable="true" enabled="true" text="{[email protected]}"/>
<mx:RadioButton id="radioArray"
data="{[email protected]}"
selected="{[email protected]=='true'}"/>
</mx:Repeater>
없음 바인딩 작품처럼 - 내가 여기까지 모두 같은 경고입니다 : 나는 종류의 이유를 얻을
warning: unable to bind to property 'text' on class 'XML' (class is not an IEventDispatcher)
그럴 경우 사용자가 소스 xml로 다시 편집 할 수있는 데이터를 바인딩하는 방법을 놓치지 마세요. 나는 트리 자체를 편집 가능하게 만들 수 있다는 것을 알고 있지만 실제로는 옵션이 아닙니다.
그래서 모든 포인터 또는 아이디어는 매우 감사하겠습니다!