<?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: Typesafe assignable enumerations in AS3</title>
	<atom:link href="http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/</link>
	<description>Just another coder</description>
	<lastBuildDate>Wed, 16 Nov 2011 19:05:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Robert Cesaric</title>
		<link>http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/comment-page-1/#comment-6884</link>
		<dc:creator>Robert Cesaric</dc:creator>
		<pubDate>Wed, 28 Sep 2011 02:58:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.liranuna.com/?p=769#comment-6884</guid>
		<description>Great work!!  I combined sameer&#039;s and chris&#039; ideas above.  I ran a few tests and it appears to work the same and doesn&#039;t require the recursive constructor:

public class Direction
	{
		
		public static const NONE:Direction	= new Direction(&quot;undefined&quot;);
		public static const UP:Direction	= new Direction(&quot;UP&quot;);
		public static const DOWN:Direction	= new Direction(&quot;DOWN&quot;);
		public static const LEFT:Direction	= new Direction(&quot;LEFT&quot;);
		public static const RIGHT:Direction	= new Direction(&quot;Right&quot;);
		
		private var _value:String;
		
		public function Direction(value:String)
		{
			this._value = value;
		}
		
		public function toString():String
		{
			return _value;
		}
		
	}</description>
		<content:encoded><![CDATA[<p>Great work!!  I combined sameer&#8217;s and chris&#8217; ideas above.  I ran a few tests and it appears to work the same and doesn&#8217;t require the recursive constructor:</p>
<p>public class Direction<br />
	{</p>
<p>		public static const NONE:Direction	= new Direction(&#8220;undefined&#8221;);<br />
		public static const UP:Direction	= new Direction(&#8220;UP&#8221;);<br />
		public static const DOWN:Direction	= new Direction(&#8220;DOWN&#8221;);<br />
		public static const LEFT:Direction	= new Direction(&#8220;LEFT&#8221;);<br />
		public static const RIGHT:Direction	= new Direction(&#8220;Right&#8221;);</p>
<p>		private var _value:String;</p>
<p>		public function Direction(value:String)<br />
		{<br />
			this._value = value;<br />
		}</p>
<p>		public function toString():String<br />
		{<br />
			return _value;<br />
		}</p>
<p>	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/comment-page-1/#comment-6866</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Mon, 10 Jan 2011 10:07:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.liranuna.com/?p=769#comment-6866</guid>
		<description>what&#039;s stopping you from passing in &quot;null&quot; into the constructor?</description>
		<content:encoded><![CDATA[<p>what&#8217;s stopping you from passing in &#8220;null&#8221; into the constructor?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wyrmmage</title>
		<link>http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/comment-page-1/#comment-6621</link>
		<dc:creator>wyrmmage</dc:creator>
		<pubDate>Wed, 02 Dec 2009 17:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.liranuna.com/?p=769#comment-6621</guid>
		<description>Very useful!

Thank you for this :)</description>
		<content:encoded><![CDATA[<p>Very useful!</p>
<p>Thank you for this :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohan</title>
		<link>http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/comment-page-1/#comment-6617</link>
		<dc:creator>Mohan</dc:creator>
		<pubDate>Wed, 28 Oct 2009 16:58:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.liranuna.com/?p=769#comment-6617</guid>
		<description>Was quite useful, especially Sameer&#039;s comment. I think I&#039;d go with that :)</description>
		<content:encoded><![CDATA[<p>Was quite useful, especially Sameer&#8217;s comment. I think I&#8217;d go with that :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sameer</title>
		<link>http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/comment-page-1/#comment-6605</link>
		<dc:creator>sameer</dc:creator>
		<pubDate>Wed, 12 Aug 2009 19:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.liranuna.com/?p=769#comment-6605</guid>
		<description>instead of the switch statement inside toString() how about have a instance variable _value and pass in the hard-coded value through the constructor:
public function Direction(d:Direction, value:String) {
this._value = value
}
 
and return _value inside toString() method.  Would this work?</description>
		<content:encoded><![CDATA[<p>instead of the switch statement inside toString() how about have a instance variable _value and pass in the hard-coded value through the constructor:<br />
public function Direction(d:Direction, value:String) {<br />
this._value = value<br />
}</p>
<p>and return _value inside toString() method.  Would this work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Russell</title>
		<link>http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/comment-page-1/#comment-6569</link>
		<dc:creator>Alex Russell</dc:creator>
		<pubDate>Sat, 28 Feb 2009 06:18:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.liranuna.com/?p=769#comment-6569</guid>
		<description>Thanks for this! Really useful.</description>
		<content:encoded><![CDATA[<p>Thanks for this! Really useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin</title>
		<link>http://www.liranuna.com/typesafe-assignable-enumerations-in-as3/comment-page-1/#comment-6538</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Mon, 15 Sep 2008 21:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.liranuna.com/?p=769#comment-6538</guid>
		<description>you should declare the class as final, so it can not be extended to override anything you&#039;ve done.</description>
		<content:encoded><![CDATA[<p>you should declare the class as final, so it can not be extended to override anything you&#8217;ve done.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

