<?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>addEventListenerで実行するメソッドにパラメーター渡す へのコメント</title>
	<atom:link href="http://www.trick7.com/blog/2009/08/25-145851.php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.trick7.com/blog/2009/08/25-145851.php</link>
	<description>flashの勉強・書籍・サイトについて</description>
	<lastBuildDate>Tue, 13 Sep 2011 14:17:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>taka:nium より</title>
		<link>http://www.trick7.com/blog/2009/08/25-145851.php/comment-page-1#comment-114005</link>
		<dc:creator>taka:nium</dc:creator>
		<pubDate>Tue, 15 Sep 2009 11:01:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.trick7.com/blog/?p=1406#comment-114005</guid>
		<description>対象とイベント名をそれぞれ e.target と e.type にしておけば、毎回書き変えなくて済みますよー。

var listener:Function = function( num:int ):Function {
	return function( e:Event ):void {
		e.target.removeEventListener( e.type, arguments.callee );
		trace( num );
	}
};
stage.addEventListener( MouseEvent.CLICK, listener( 3 ) );</description>
		<content:encoded><![CDATA[							<p>対象とイベント名をそれぞれ e.target と e.type にしておけば、毎回書き変えなくて済みますよー。</p>
							<p>var listener:Function = function( num:int ):Function {<br />
								return function( e:Event ):void {<br />
									e.target.removeEventListener( e.type, arguments.callee );<br />
									trace( num );<br />
								}<br />
							};<br />
							stage.addEventListener( MouseEvent.CLICK, listener( 3 ) );</p>
]]></content:encoded>
	</item>
	<item>
		<title>tera より</title>
		<link>http://www.trick7.com/blog/2009/08/25-145851.php/comment-page-1#comment-114003</link>
		<dc:creator>tera</dc:creator>
		<pubDate>Tue, 15 Sep 2009 10:50:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.trick7.com/blog/?p=1406#comment-114003</guid>
		<description>おぉ、そうなんですね！ありがとうー。</description>
		<content:encoded><![CDATA[							<p>おぉ、そうなんですね！ありがとうー。</p>
]]></content:encoded>
	</item>
	<item>
		<title>alumican より</title>
		<link>http://www.trick7.com/blog/2009/08/25-145851.php/comment-page-1#comment-114002</link>
		<dc:creator>alumican</dc:creator>
		<pubDate>Tue, 15 Sep 2009 10:48:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.trick7.com/blog/?p=1406#comment-114002</guid>
		<description>この方法だとremoveEventListenerできずにうっかりメモリリークしてしまいがちなので気をつけてください。

関数クロージャによって登録されたイベントハンドラをリムーブしたいときにはハンドラ内で
removeEventListener(Event.SELECT, arguments.callee);
を実行できるようにしておくといいです。</description>
		<content:encoded><![CDATA[							<p>この方法だとremoveEventListenerできずにうっかりメモリリークしてしまいがちなので気をつけてください。</p>
							<p>関数クロージャによって登録されたイベントハンドラをリムーブしたいときにはハンドラ内で<br />
							removeEventListener(Event.SELECT, arguments.callee);<br />
							を実行できるようにしておくといいです。</p>
]]></content:encoded>
	</item>
	<item>
		<title>tera より</title>
		<link>http://www.trick7.com/blog/2009/08/25-145851.php/comment-page-1#comment-113689</link>
		<dc:creator>tera</dc:creator>
		<pubDate>Wed, 26 Aug 2009 02:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.trick7.com/blog/?p=1406#comment-113689</guid>
		<description>にとよんさん
どうもありがとうございます。
関数を返すって概念あたりが僕の知識の向こう側ですｗ。
教えていただくとなんとなくはわかるのですが、本来の引数のEventがそれで渡せるんや～みたいなことがなんだか不思議な感じです。</description>
		<content:encoded><![CDATA[							<p>にとよんさん<br />
							どうもありがとうございます。<br />
							関数を返すって概念あたりが僕の知識の向こう側ですｗ。<br />
							教えていただくとなんとなくはわかるのですが、本来の引数のEventがそれで渡せるんや～みたいなことがなんだか不思議な感じです。</p>
]]></content:encoded>
	</item>
	<item>
		<title>nitoyon より</title>
		<link>http://www.trick7.com/blog/2009/08/25-145851.php/comment-page-1#comment-113678</link>
		<dc:creator>nitoyon</dc:creator>
		<pubDate>Tue, 25 Aug 2009 14:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.trick7.com/blog/?p=1406#comment-113678</guid>
		<description>hoge が返すのは関数なので戻り値を明示したいなら
&gt; private function hoge(num:int):Function{
とするとよいでしょう！</description>
		<content:encoded><![CDATA[							<p>hoge が返すのは関数なので戻り値を明示したいなら<br />
							&gt; private function hoge(num:int):Function{<br />
							とするとよいでしょう！</p>
]]></content:encoded>
	</item>
</channel>
</rss>

