<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Faking Enums in AS3</title>
	<atom:link href="http://scottbilas.com/blog/faking-enums-in-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://scottbilas.com/blog/faking-enums-in-as3/</link>
	<description>Take what you want, and leave the rest (just like your salad bar).</description>
	<lastBuildDate>Mon, 06 Feb 2012 03:15:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: superSc</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-1081</link>
		<dc:creator>superSc</dc:creator>
		<pubDate>Sat, 15 Oct 2011 14:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-1081</guid>
		<description>http://www.scripter.co.kr/186

thank you.

i see your posting.. 

and

i write my blog posting 



this is great idea!</description>
		<content:encoded><![CDATA[<p><a href="http://www.scripter.co.kr/186" rel="nofollow">http://www.scripter.co.kr/186</a></p>
<p>thank you.</p>
<p>i see your posting.. </p>
<p>and</p>
<p>i write my blog posting </p>
<p>this is great idea!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Numeric Enumerations (Enums) for AS3 &#124; Rough Sea Games</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-455</link>
		<dc:creator>Numeric Enumerations (Enums) for AS3 &#124; Rough Sea Games</dc:creator>
		<pubDate>Wed, 14 Apr 2010 09:12:01 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-455</guid>
		<description>[...] Further readings on AS3 enums can be found here: e.g. http://www.herrodius.com/blog/87, http://scottbilas.com/blog/faking-enums-in-as3/ or http://blog.petermolgaard.com/2008/11/02/actionscript-3-enums/ AKPC_IDS += &quot;1149,&quot;;Popularity: [...]</description>
		<content:encoded><![CDATA[<p>[...] Further readings on AS3 enums can be found here: e.g. <a href="http://www.herrodius.com/blog/87" rel="nofollow">http://www.herrodius.com/blog/87</a>, <a href="http://scottbilas.com/blog/faking-enums-in-as3/" rel="nofollow">http://scottbilas.com/blog/faking-enums-in-as3/</a> or <a href="http://blog.petermolgaard.com/2008/11/02/actionscript-3-enums/" rel="nofollow">http://blog.petermolgaard.com/2008/11/02/actionscript-3-enums/</a> AKPC_IDS += &quot;1149,&quot;;Popularity: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoffer Enedahls bits and pieces &#183; Preventing duplicate values in string constants</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-427</link>
		<dc:creator>Christoffer Enedahls bits and pieces &#183; Preventing duplicate values in string constants</dc:creator>
		<pubDate>Tue, 09 Mar 2010 20:13:35 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-427</guid>
		<description>[...] idéa of using describeType comes from the excellent Enum pattern I love. Here is a variant of the Enum pattern I use. It&#8217;s a pity that PureMVC have strings as key and not enums. [...]</description>
		<content:encoded><![CDATA[<p>[...] idéa of using describeType comes from the excellent Enum pattern I love. Here is a variant of the Enum pattern I use. It&#8217;s a pity that PureMVC have strings as key and not enums. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ultimate AS3 Fake Enums at New Fun Blog &#8211; Scott Bilas</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-333</link>
		<dc:creator>Ultimate AS3 Fake Enums at New Fun Blog &#8211; Scott Bilas</dc:creator>
		<pubDate>Thu, 24 Dec 2009 22:02:51 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-333</guid>
		<description>[...] This is hopefully the last revision I’m going to make to my fake AS3 enum class (here’s the original posting, then two updates). This is inspired by commenter Miko Korpela, who asked about an iteration [...]</description>
		<content:encoded><![CDATA[<p>[...] This is hopefully the last revision I’m going to make to my fake AS3 enum class (here’s the original posting, then two updates). This is inspired by commenter Miko Korpela, who asked about an iteration [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Things I hate about AS3 : diffusion games: blog</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-326</link>
		<dc:creator>Things I hate about AS3 : diffusion games: blog</dc:creator>
		<pubDate>Wed, 16 Dec 2009 22:03:14 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-326</guid>
		<description>[...] Where the heck are the enums? There are some nifty ways to roll your own via reflection (looking at the XML of the class itself), but come on here, people &#8212; this [...]</description>
		<content:encoded><![CDATA[<p>[...] Where the heck are the enums? There are some nifty ways to roll your own via reflection (looking at the XML of the class itself), but come on here, people &#8212; this [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Asher Rivello</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-246</link>
		<dc:creator>Samuel Asher Rivello</dc:creator>
		<pubDate>Wed, 12 Aug 2009 00:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-246</guid>
		<description>Enums are my favorite community developed language feature!!!

An Enum is a kind of variable that is not natively available in ActionScript 3.0, but can be found in other languages such as C++. An enum is a type with a restricted set of values. 

This uses Scott&#039;s Technique!

Here is  a demo;
http://www.blog.rivello.org/?p=621</description>
		<content:encoded><![CDATA[<p>Enums are my favorite community developed language feature!!!</p>
<p>An Enum is a kind of variable that is not natively available in ActionScript 3.0, but can be found in other languages such as C++. An enum is a type with a restricted set of values. </p>
<p>This uses Scott&#8217;s Technique!</p>
<p>Here is  a demo;<br />
<a href="http://www.blog.rivello.org/?p=621" rel="nofollow">http://www.blog.rivello.org/?p=621</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-51</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Thu, 11 Dec 2008 17:19:06 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-51</guid>
		<description>Rather than post a comment reply, I figured I’d do a new post instead! :)

http://scottbilas.com/2008/12/11/update-faking-enums-in-as3/</description>
		<content:encoded><![CDATA[<p>Rather than post a comment reply, I figured I’d do a new post instead! <img src='http://scottbilas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://scottbilas.com/2008/12/11/update-faking-enums-in-as3/" rel="nofollow">http://scottbilas.com/2008/12/11/update-faking-enums-in-as3/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cardin</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-50</link>
		<dc:creator>Cardin</dc:creator>
		<pubDate>Tue, 09 Dec 2008 08:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-50</guid>
		<description>Maybe this could be brought to another level of automation. It&#039;s conceivable to leave out the instantiation of the constant altogether, and leave the constant as null.

Then, as you&#039;re transversing through the class structure in CStringUtils.InitEnumConstants, you instantiate the constants there, along with their names.

class EState
{
    public var Text :String;
    {CStringUtils.InitEnumConstants(EState);} // static ctor

    public static const Initializing :EState;
    public static const Connecting   :EState;
    public static const Loading      :EState;
    public static const Ready        :EState;
}

class CStringUtils
{
    public static function InitEnumConstants(inType :*) :void
    {
        var type :XML = flash.utils.describeType(inType);
        for each (var constant :XML in type.constant)
        {
            inType[constant.@name] = new inType();
            inType[constant.@name].Text = constant.@name;
    }
}

That was about as much automation as I could push it, heh. I really wanted to get rid of the static constructor and find some way to let a base Enum class handle everything, but my current idea would involve calling super(), which would need to have the constructor. Writing out the constructors is a lot more work than writing a one-liner static constructor, so i think sticking with the static is the best thus far.

Nice work, btw. One of the most ingenious ideas I&#039;ve ever seen.</description>
		<content:encoded><![CDATA[<p>Maybe this could be brought to another level of automation. It&#8217;s conceivable to leave out the instantiation of the constant altogether, and leave the constant as null.</p>
<p>Then, as you&#8217;re transversing through the class structure in CStringUtils.InitEnumConstants, you instantiate the constants there, along with their names.</p>
<p>class EState<br />
{<br />
    public var Text :String;<br />
    {CStringUtils.InitEnumConstants(EState);} // static ctor</p>
<p>    public static const Initializing :EState;<br />
    public static const Connecting   :EState;<br />
    public static const Loading      :EState;<br />
    public static const Ready        :EState;<br />
}</p>
<p>class CStringUtils<br />
{<br />
    public static function InitEnumConstants(inType :*) :void<br />
    {<br />
        var type :XML = flash.utils.describeType(inType);<br />
        for each (var constant :XML in type.constant)<br />
        {<br />
            inType[constant.@name] = new inType();<br />
            inType[constant.@name].Text = constant.@name;<br />
    }<br />
}</p>
<p>That was about as much automation as I could push it, heh. I really wanted to get rid of the static constructor and find some way to let a base Enum class handle everything, but my current idea would involve calling super(), which would need to have the constructor. Writing out the constructors is a lot more work than writing a one-liner static constructor, so i think sticking with the static is the best thus far.</p>
<p>Nice work, btw. One of the most ingenious ideas I&#8217;ve ever seen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ActionScript 3 Enums &#171; The Combined Corner</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-49</link>
		<dc:creator>ActionScript 3 Enums &#171; The Combined Corner</dc:creator>
		<pubDate>Sun, 02 Nov 2008 21:22:53 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-49</guid>
		<description>[...] writings about different ways of faking Enums in ActionScript 3, I decided to do my own based on Scott&#8217;s and Barney&#8217;s [...]</description>
		<content:encoded><![CDATA[<p>[...] writings about different ways of faking Enums in ActionScript 3, I decided to do my own based on Scott&#8217;s and Barney&#8217;s [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ActionScript Enums &#171; The Combined Corner</title>
		<link>http://scottbilas.com/blog/faking-enums-in-as3/#comment-48</link>
		<dc:creator>ActionScript Enums &#171; The Combined Corner</dc:creator>
		<pubDate>Sun, 26 Oct 2008 19:30:33 +0000</pubDate>
		<guid isPermaLink="false">http://scottbilas.wordpress.com/2008/06/01/faking-enums-in-as3/#comment-48</guid>
		<description>[...] http://scottbilas.com/2008/06/01/faking-enums-in-as3/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://scottbilas.com/2008/06/01/faking-enums-in-as3/" rel="nofollow">http://scottbilas.com/2008/06/01/faking-enums-in-as3/</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

