<?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 getter/setter methods in AS 2.0</title>
	<atom:link href="http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/</link>
	<description>Rich Internet Applications, Software Development, Human-Computer Interaction</description>
	<lastBuildDate>Wed, 31 Mar 2010 09:03:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Rob Grzywinski</title>
		<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/comment-page-1/#comment-36990</link>
		<dc:creator>Rob Grzywinski</dc:creator>
		<pubDate>Thu, 03 May 2007 12:42:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/#comment-36990</guid>
		<description>To override a getter / setter:

override public function set data(value:Object):void {
...
super.data = value;
}

override public function get data():Object {
...
return super.data;
}</description>
		<content:encoded><![CDATA[<p>To override a getter / setter:</p>
<p>override public function set data(value:Object):void {<br />
&#8230;<br />
super.data = value;<br />
}</p>
<p>override public function get data():Object {<br />
&#8230;<br />
return super.data;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/comment-page-1/#comment-1288</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Thu, 18 May 2006 11:50:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/#comment-1288</guid>
		<description>ash&#039;s method will work, but unfortunately it will affect EVERY instance of the same class on the stage, not just the one that is being set.

any other good ideas?</description>
		<content:encoded><![CDATA[<p>ash&#8217;s method will work, but unfortunately it will affect EVERY instance of the same class on the stage, not just the one that is being set.</p>
<p>any other good ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/comment-page-1/#comment-713</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Fri, 14 Apr 2006 22:32:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/#comment-713</guid>
		<description>It&#039;s been my experience that you can&#039;t call a super getter/setter. You can override it but you can&#039;t call the parent version with super. Ash&#039;s method probably works though. It&#039;s good to know.</description>
		<content:encoded><![CDATA[<p>It&#8217;s been my experience that you can&#8217;t call a super getter/setter. You can override it but you can&#8217;t call the parent version with super. Ash&#8217;s method probably works though. It&#8217;s good to know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: felix</title>
		<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/comment-page-1/#comment-710</link>
		<dc:creator>felix</dc:creator>
		<pubDate>Fri, 14 Apr 2006 17:08:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/#comment-710</guid>
		<description>thanks for your comments...makes sense now...</description>
		<content:encoded><![CDATA[<p>thanks for your comments&#8230;makes sense now&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ash</title>
		<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/comment-page-1/#comment-709</link>
		<dc:creator>Ash</dc:creator>
		<pubDate>Fri, 14 Apr 2006 16:48:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/#comment-709</guid>
		<description>This is the aforementioned hackery..

It accesses the prototypes directly rather than using super.

public function get enabled():Boolean {
		return this.__proto__.__proto__.enabled;
	}
	
	public function set enabled(mode:Boolean):Void {
		trace(mode);
		this.__proto__.__proto__.enabled = mode;
		this.gotoAndStop(mode ? &quot;up&quot; : &quot;disabled&quot;);
	}</description>
		<content:encoded><![CDATA[<p>This is the aforementioned hackery..</p>
<p>It accesses the prototypes directly rather than using super.</p>
<p>public function get enabled():Boolean {<br />
		return this.__proto__.__proto__.enabled;<br />
	}</p>
<p>	public function set enabled(mode:Boolean):Void {<br />
		trace(mode);<br />
		this.__proto__.__proto__.enabled = mode;<br />
		this.gotoAndStop(mode ? &#8220;up&#8221; : &#8220;disabled&#8221;);<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JesterXL</title>
		<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/comment-page-1/#comment-707</link>
		<dc:creator>JesterXL</dc:creator>
		<pubDate>Fri, 14 Apr 2006 16:24:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/#comment-707</guid>
		<description>enabled is basically marked as &quot;final&quot;; it gets confused because the getter/setter name is the same as the base property.

The solution is to use a watcher instead.  It&#039;s heavier, but it works.  Look at how it&#039;s done via mx.core.UIComponent (Flash MX 2004 or 8).</description>
		<content:encoded><![CDATA[<p>enabled is basically marked as &#8220;final&#8221;; it gets confused because the getter/setter name is the same as the base property.</p>
<p>The solution is to use a watcher instead.  It&#8217;s heavier, but it works.  Look at how it&#8217;s done via mx.core.UIComponent (Flash MX 2004 or 8).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ash</title>
		<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/comment-page-1/#comment-705</link>
		<dc:creator>Ash</dc:creator>
		<pubDate>Fri, 14 Apr 2006 16:15:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/#comment-705</guid>
		<description>I think its because enabled is treated as a property, and you can&#039;t set properties of a superclass (its a prototype, not an instance).

I don&#039;t know if its possible without some sneaky hackery.</description>
		<content:encoded><![CDATA[<p>I think its because enabled is treated as a property, and you can&#8217;t set properties of a superclass (its a prototype, not an instance).</p>
<p>I don&#8217;t know if its possible without some sneaky hackery.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flashape</title>
		<link>http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/comment-page-1/#comment-704</link>
		<dc:creator>flashape</dc:creator>
		<pubDate>Fri, 14 Apr 2006 16:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2006/04/14/overriding-gettersetter-methods-in-as-20/#comment-704</guid>
		<description>wierd...i tried out and couldnt get it working.  tried it with _visible to, same thing.</description>
		<content:encoded><![CDATA[<p>wierd&#8230;i tried out and couldnt get it working.  tried it with _visible to, same thing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
