<?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: Overriding Variables</title>
	<atom:link href="http://jacksondunstan.com/articles/251/feed" rel="self" type="application/rss+xml" />
	<link>http://jacksondunstan.com/articles/251</link>
	<description>Mastering AS3</description>
	<lastBuildDate>Mon, 14 May 2012 17:02:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: AlexG</title>
		<link>http://jacksondunstan.com/articles/251/comment-page-1#comment-21305</link>
		<dc:creator>AlexG</dc:creator>
		<pubDate>Sat, 28 Jan 2012 16:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=251#comment-21305</guid>
		<description>Yeah, private variables are not visible to any other classes, even child classes.
If you do

class Parent
{
    protected var name:String; // or public 
}
class Child extends Parent
{
    protected var name:String;
} 
It will give error nr.1152 - conflict in namespaces.</description>
		<content:encoded><![CDATA[<p>Yeah, private variables are not visible to any other classes, even child classes.<br />
If you do</p>
<p>class Parent<br />
{<br />
    protected var name:String; // or public<br />
}<br />
class Child extends Parent<br />
{<br />
    protected var name:String;<br />
}<br />
It will give error nr.1152 &#8211; conflict in namespaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/251/comment-page-1#comment-46</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Thu, 17 Sep 2009 16:26:12 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=251#comment-46</guid>
		<description>Yep, that was my conclusion too:

&lt;blockquote&gt;
We see here that behind the scenes there are really two name fields of a Child object. The private scoping on the variable seems to go one step further than in other languages and actually scope the private variable to only the class declaring it, not simply disallowing access to children.
&lt;/blockquote&gt;

This is kind of cool in the sense that you don&#039;t have to worry about your parent classes&#039; variable names but, as shown above, can also be quite confusing.

Thanks for commenting!</description>
		<content:encoded><![CDATA[<p>Yep, that was my conclusion too:</p>
<blockquote><p>
We see here that behind the scenes there are really two name fields of a Child object. The private scoping on the variable seems to go one step further than in other languages and actually scope the private variable to only the class declaring it, not simply disallowing access to children.
</p></blockquote>
<p>This is kind of cool in the sense that you don&#8217;t have to worry about your parent classes&#8217; variable names but, as shown above, can also be quite confusing.</p>
<p>Thanks for commenting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim K</title>
		<link>http://jacksondunstan.com/articles/251/comment-page-1#comment-45</link>
		<dc:creator>Tim K</dc:creator>
		<pubDate>Thu, 17 Sep 2009 14:49:38 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=251#comment-45</guid>
		<description>private will be unavailabe to ALL other classes even children. If you want a variable to be private AND available to children, then you have to use protected instead of private. 

Technically you are not overriding anything, because the name variable (in my mind) doesn&#039;t exist in the child if it&#039;s set to private in the parent. However if you use protected and do not specify that you&#039;d like to override with the override keyword, then you&#039;ll probably get an error.</description>
		<content:encoded><![CDATA[<p>private will be unavailabe to ALL other classes even children. If you want a variable to be private AND available to children, then you have to use protected instead of private. </p>
<p>Technically you are not overriding anything, because the name variable (in my mind) doesn&#8217;t exist in the child if it&#8217;s set to private in the parent. However if you use protected and do not specify that you&#8217;d like to override with the override keyword, then you&#8217;ll probably get an error.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

