我遇到了火花CurrencyFormatter
,它无法正确格式化值0
。Flex Spark CurrencyFormatter格式'0'格式错误
所有其他值的格式都很好。
我使用Flex 4.5
下面是一个例子:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<s:CurrencyFormatter currencyISOCode="GBP" id="formatter" useCurrencySymbol="true" currencySymbol="£" trailingZeros="true" leadingZero="true" negativeCurrencyFormat="0" positiveCurrencyFormat="0" />
</fx:Declarations>
<s:HGroup>
<s:TextInput id="textInput" />
<s:Label text="{formatter.format(textInput.text)}" />
</s:HGroup>
</s:Application>
当textInput
的值不为0的,它的格式正确无误。
正确设置此格式的正确设置是什么?