【发布时间】:2009-04-27 15:25:26
【问题描述】:
有没有人注意到 Flex 应用程序中的 UI 呈现不一致。我在中继器内遇到单选按钮和文本控件问题。下面是一个示例...
什么会导致这种不一致?电脑性能、网速?
下面的转发器有一个 XML Web 服务作为数据提供者,使用 Flex 的 e4x 支持。在给定的 Flex 应用程序中可以呈现的数据是否存在阈值?
请注意,大多数时间 Flex 可以正常渲染应用程序,但 大多数时间在此应用程序中还不够好。
谢谢。
alt text http://img87.imageshack.us/img87/1435/error3b.jpg
MXML 代码如下,根据要求:
<mx:Repeater id="rpQuestions" width="100%" height="100%" dataProvider="{srv.lastResult..Question}">
<mx:Box backgroundColor="#FFFF99" width="100%">
<mx:Text styleName="questionText" text ="{rpQuestions.currentIndex+1 +': ' +rpQuestions.currentItem.@QuestionText}" fontSize ="12" width="100%" selectable="false" />
</mx:Box>
<mx:HBox visible="{rpQuestions.currentItem..Image.length() > 0}" includeInLayout="{rpQuestions.currentItem..Image.length() > 0}">
<mx:Repeater id="rpImages" dataProvider=quot;{rpQuestions.currentItem..Image}" >
<mx:Image source="{rpImages.currentItem.@Path}" width="350" height="250" />
</mx:Repeater>
</mx:HBox>
<mx:Repeater id="rpAnswers" dataProvider="{rpQuestions.currentItem..Answer}" width="75%" height="75%">
<mx:HBox>
<mx:Spacer width="12" />
<!-- NOTE: the RadioButton's label property is not used because long text won't wrap. Instead we use a Text control. -->
<mx:RadioButton
groupName="{rpQuestions.currentItem.@QuestionID}"
value="{rpAnswers.currentItem.@AnswerID}"
click="_questionAnswerd(event)"
selected="{rpAnswers.currentItem.@Selected == '1'}"
/>
<mx:Text text="{rpAnswers.currentItem.@Answer}" width="600" selectable="false" />
<!-- End-->
</mx:HBox>
</mx:Repeater>
</mx:Repeater>
【问题讨论】:
-
刚刚编辑的问题包括 mxml。
标签: apache-flex flex3 air flash