This came up on this list recently and apparently it's not a great idea:

http://tech.groups.yahoo.com/group/flexcoders/message/136096

We're using Granite DS which *does* generate a mirror ActionScript Enum
type, but apparently this approach is fraught with peril (because
Flash--unlike Java--won't guarantee that you have only one instance of
your Enum). I've reviewed our usage, and we're not doing anything where
this would hurt us, but I can easily imagine problems.

E.g., if you put your Enum in an ArrayCollection and later try to find
it by using getItemIndex, but you pass a different Enum instance to
getItemIndex, the ArrayCollection won't find it because it uses == to
compare objects, and two separate instances of the same Enum are not ==.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-----Original Message-----
From: sunmoorthy1 <sunmoort...@yahoo.com>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Enum in Fles
Date: Thu, 26 Feb 2009 21:22:47 -0000

Hi,

I am using BlazeDS for communicate Flex with java application.
I want to know how to how to convert enum object to Flex ActionScript 
object.







Reply via email to