> I am playing around in the OO development world and got to 
> wondering if I could simulate an enumerated type in 
> ColdFusion.  Using .NET, I could have a class called 
> CommunityAccessLevel that would then have public static 
> fields of Admin, Edit, None, Read, and Select.  There might 
> also be methods of Equals to do comparisons, GetType to get 
> the type of the current instance, etc.
>  
> I can handle the methods as they would just be cffunctions in 
> the component. How would you (or could you) setup the static 
> fields though?
>  
> Am I missing something obvious?

There's nothing really analogous to enumerated types in CFML. CFML doesn't
even have constants! So, no, I don't think you're missing anything obvious.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198328
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to