I guess, that intelligent guess also does the data type check. For example, if compiler finds flag is Boolean type it would look for possible values, i.e. true or false. If compiler doesn't find it, it would throw compile time error....
 
If flag is string type, it would take any assigned value as string without any further checks....
 
my intelligent guess ;)
 
 
-abdul
 
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Thijs Triemstra | Collab
Sent: Saturday, June 18, 2005 1:56 AM
To: [email protected]
Subject: Re: [flexcoders] AS Array vs. MXML Array

Hehe..

And would this work?

var theLabel:String = "d4";
var theData:Number = 4;
var theBoolean:Boolean = true;

<mx:Array>

  <mx:Object label=”{String(theLabel)}” data="" flag="{Boolean(theBoolean)}" />

</mx:Array>

And if it doesn't work, does that mean that Flex always recognize 'true' as a Boolean and not as a String?

I can't think of a case where it would matter that your 'best-guess' is wrong but just interested..


Thijs



Op 17-jun-2005, om 22:09 heeft Matt Chotin het volgende geschreven:

We make a “best-guess” as to whether it should be a string or a number or a boolean.  Sometimes people get frustrated because we guess number and they wanted string J


From: [email protected] [mailto:[email protected]] On Behalf Of Thijs Triemstra | Collab
Sent: Friday, June 17, 2005 1:06 PM
To: [email protected]
Subject: Re: [flexcoders] AS Array vs. MXML Array

What about the :Number and :String difference in his Array, aren't the label and data properties both Strings now..?

Thijs

Op 17-jun-2005, om 21:51 heeft Matt Chotin het volgende geschreven:



<mx:Array>

  <mx:Object>

    <label>d4</label>

    <data>4</data>

  </mx:Object>

</mx:Array>

Alternatively:

<mx:Array>

  <mx:Object label=”d4” data="" boolean="{Boolean(true)}" />

</mx:Array>

Matt


From: [email protected] [mailto:[email protected]] On Behalf Of JesterXL
Sent: Friday, June 17, 2005 12:44 PM
To: Flexcoders
Subject: [flexcoders] AS Array vs. MXML Array

How do you get fine grained control in MXML arrays?  Like, how do I [EMAIL PROTECTED]
 

·  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





Yahoo! Groups Links





Yahoo! Groups Links

Reply via email to