Hi,

well in the end everything is an object, so you are not really mixing
datatypes.

It all depends on the scope of your project I think, but seeing the code
below doesn't make me wanna be the maintainer of that project when its
author goes on vacation or sickleave :).

I think that in asking 'is this acceptable?' you are already answering your
own question. If you think its dubious, others will think its dubious.

greetz
JC


On 7/10/07, Mendelsohn, Michael <[EMAIL PROTECTED]> wrote:

...is it considered acceptable?  Is it ok to mix data types in an array?

function getData(which):Array {
       switch (which) {
       case ("A") :
               return ["A",{abc:"dog"}];
       case ("B") :
               return ["B",{def:"cat"}];
       }
}

var goofy:String = getData("A")[1]["abc"];
var felix:String = getData("B")[1]["def"];
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to