<?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: The this keyword in inline functions</title>
	<atom:link href="http://www.rubenswieringa.com/blog/the-this-keyword-in-inline-functions/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rubenswieringa.com/blog/the-this-keyword-in-inline-functions</link>
	<description>Ruben Swieringa on Actionscript and a whole lot of other stuff..</description>
	<lastBuildDate>Wed, 25 Jan 2012 12:03:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: All in a post (4)&#160;&#124;&#160;Web X.Y</title>
		<link>http://www.rubenswieringa.com/blog/the-this-keyword-in-inline-functions/comment-page-1#comment-91337</link>
		<dc:creator>All in a post (4)&#160;&#124;&#160;Web X.Y</dc:creator>
		<pubDate>Sun, 06 Sep 2009 10:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubenswieringa.com/blog/the-this-keyword-in-inline-functions#comment-91337</guid>
		<description>[...] In line functions in ActionScript and this(link) [...]</description>
		<content:encoded><![CDATA[<p>[...] In line functions in ActionScript and this(link) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.rubenswieringa.com/blog/the-this-keyword-in-inline-functions/comment-page-1#comment-68914</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Tue, 04 Nov 2008 18:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubenswieringa.com/blog/the-this-keyword-in-inline-functions#comment-68914</guid>
		<description>What is really going on is that when you use &#039;this&#039; within an inline function you have to think of what context or class the function is executed in at runtime. In the exanoke of a close handler for an Alert the close handler is called from an AlertForm so &#039;this&#039; refers to the AlertForm class.

A quick fix might be something like:
      var outerThis:Object = this;
      callLater (function():void{
   
        outerThis.myVar = &quot;bla-die-bla&quot;;
   
      });</description>
		<content:encoded><![CDATA[<p>What is really going on is that when you use &#8216;this&#8217; within an inline function you have to think of what context or class the function is executed in at runtime. In the exanoke of a close handler for an Alert the close handler is called from an AlertForm so &#8216;this&#8217; refers to the AlertForm class.</p>
<p>A quick fix might be something like:<br />
      var outerThis:Object = this;<br />
      callLater (function():void{</p>
<p>        outerThis.myVar = &#8220;bla-die-bla&#8221;;</p>
<p>      });</p>
]]></content:encoded>
	</item>
</channel>
</rss>

