So how about this:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" backgroundColor="#FFFFFF"
     creationComplete="onCreationComplete()">
     <mx:Script>
         <![CDATA[
             private function onCreationComplete():void
             {
                  var myDP:Array = [{data:"0",
label:"0°F"},{data:"20", label:"2°F"}];
                  myComboBox.dataProvider = myDP;
             }
         ]]>
     </mx:Script>
     <mx:ComboBox id="myComboBox" x="100" y="200" rowCount="2"
prompt="ComboBox Test"/>
</mx:Application>

BTW - I got the degree symbol by holding down Alt then typing 0 1 7 6
(On the keypad). I found this out at
http://office.microsoft.com/en-us/project/HA011179441033.aspx


--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Aargh, the shoemaker's children are barefoot.
>
>
>
> I am creating a static dataProvider for the combobox:
>
> _aHC2SODP = [{data:"0", label:"0 &#176;F"},{data:"20", label:"2
&#176;F"}]; //looking for the "degree" symbol
>
>
>
> But the above renders literally.
>
>
>
> I have discovered that building a string in actionscript and then
assigning it to a Label.text also does *not* work:
>      var sTemp:String = "0 &#176;F";
>
>      lbltest.text = sTemp;
>
>
>
> The entity code renders literally.
>
>
>
> But declaratively, the degree symbol renders as desired:
>
> <mx:Label text="0 &#176;F" />
>
>
>
> So one sure solution is to create my static dataProviders
declaratively.  So I guess my question changes to "Is there some way to
do this in AS?"
>
>
>
> Tracy
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Alex Harui
> Sent: Friday, December 05, 2008 12:01 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] RE: How to display special characters like °
in ComboBox list
>
>
>
> Ha!  I've always wanted to say this to you:  "Post your code".  :-)
>
>
>
> Isn't that XML syntax that won't work in a CDATA block of
ActionScript?
>
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Tracy Spratt
> Sent: Thursday, December 04, 2008 4:13 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] How to display special characters like ° in
ComboBox list
>
>
>
> The special character numeric references work fine in Label and Text
and such, but are interpreted literally in a ComboBox's drop list.
>
> Any sugestions?
>
> Tracy
>

Reply via email to