我正在使用 IntelliJ IDEA 9.0.2 生成的示例 Flex 应用程序构建 Flex 4 应用程序。我将生成的 mxml 替换为 Hello Flex 4 一书中的以下代码。
当我运行它时,它只会使浏览器崩溃。它说“等待 fpdownload.adobe.com...”然后崩溃!
我在 FF 3.5.9 和 Chrome 4 上都试过了。
有什么线索吗?
[Bindable]
public var _bread:Number = Number.NaN;
]]></fx:Script>
<fx:Declarations>
<s:RadioButtonGroup id="moralityRBG"/>
<s:RadioButtonGroup id="restaurantRBG"
selectedValue="{_theory.length % 2 == 0 ? 'smoking' : 'non'}"/>
</fx:Declarations>
<s:Panel width="100%" height="100%" title="Simple Components!">
<s:layout>
<s:HorizontalLayout paddingLeft="5" paddingTop="5"/>
</s:layout>
<s:VGroup>
<s:TextArea id="textArea" width="200" height="50" text="@{_theory}"/>
<s:TextInput id="textInput" width="200" text="@{_theory}"/>
<s:HSlider id="hSlider" minimum="0" maximum="11"
liveDragging="true" width="200" value="@{_bread}"/>
<s:VSlider id="vSlider" minimum="0" maximum="11"
liveDragging="true" height="50" value="@{_bread}"/>
<s:Button label="{_theory}" width="200" color="{alarmTB.selected ? 0xFF0000 : 0}"
click="_bread = Math.min(_theory.length, 11)"/>
<s:CheckBox id="checkBox" selected="{_bread % 2 == 0}" label="even?"/>
</s:VGroup>
<s:VGroup>
<s:RadioButton label="Good" value="good" group="{moralityRBG}"/>
<s:RadioButton label="Evil" value="evil" group="{moralityRBG}"/>
<s:RadioButton label="Beyond" value="beyond" group="{moralityRBG}"/>
<s:RadioButton label="Smoking" value="smoking" group="{restaurantRBG}"/>
<s:RadioButton label="Non-Smoking" value="non" group="{restaurantRBG}"/>
<s:ToggleButton id="alarmTB" label="ALARM!"/>
<s:NumericStepper id="numericStepper" value="@{_bread}"
minimum="0" maximum="11" stepSize="1"/>
<s:Spinner id="spinner" value="@{_bread}"
minimum="0" maximum="11" stepSize="1"/>
</s:VGroup>
</s:Panel>
最佳答案
我得到了线索。根据作者彼得·阿姆斯特朗 (Peter Armstrong) 的说法,它曾经在 Flex4-beta 中正常工作但在 Flex4-Final 中出现故障的双向数据绑定(bind) :-)
此链接中列出了本书的勘误表
http://www.peterarmstrong.com/?p=214
您可能需要从除 TextArea 和 HSlider 之外的每个控件中删除 @ 符号。
-硅
关于apache-flex - Flex 4 IntelliJ IDEA 包装器 html 崩溃浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2887006/