<?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"
	>
<channel>
	<title>Comments on: Sneaky Flex trick to get the name of any calling functions</title>
	<atom:link href="http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/</link>
	<description>A blog about Adobe Flex</description>
	<pubDate>Tue, 06 Jan 2009 22:51:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: JC</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-61911</link>
		<dc:creator>JC</dc:creator>
		<pubDate>Mon, 03 Mar 2008 20:10:47 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-61911</guid>
		<description>Keep in mind that if you're running the debugger, you can see the stack trace at any time within the Debug panel.  What's also nice is that if you're on a breakpoint, you can click on any of the items in the stack in that panel to switch to that object's context, ie: be able to see its variables and such.  Very handy stuff.</description>
		<content:encoded><![CDATA[<p>Keep in mind that if you&#8217;re running the debugger, you can see the stack trace at any time within the Debug panel.  What&#8217;s also nice is that if you&#8217;re on a breakpoint, you can click on any of the items in the stack in that panel to switch to that object&#8217;s context, ie: be able to see its variables and such.  Very handy stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Cook</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-59677</link>
		<dc:creator>George Cook</dc:creator>
		<pubDate>Wed, 27 Feb 2008 09:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-59677</guid>
		<description>I was sent here by a colleague who reckoned I'd love this hacky solution. He was damn right! 

Lovely ! 

Thanks :)</description>
		<content:encoded><![CDATA[<p>I was sent here by a colleague who reckoned I&#8217;d love this hacky solution. He was damn right! </p>
<p>Lovely ! </p>
<p>Thanks <img src='http://dougmccune.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Almog Kurtser</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58373</link>
		<dc:creator>Almog Kurtser</dc:creator>
		<pubDate>Fri, 22 Feb 2008 18:15:25 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58373</guid>
		<description>Hi,

that's really nice monkey you've got :)

I think Theo and Johannes are right, mxmlc keeps the stack trace in both debug and release, it's a matter of flash player version.
I wasn't aware of the verbose-stacktraces Theo blogged about.
I guess maybe the reason they left that information in the release swf by default is to enable developers logging their apps.
Hmm..and maybe not.

Cheers,
Almog Kurtser.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>that&#8217;s really nice monkey you&#8217;ve got <img src='http://dougmccune.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I think Theo and Johannes are right, mxmlc keeps the stack trace in both debug and release, it&#8217;s a matter of flash player version.<br />
I wasn&#8217;t aware of the verbose-stacktraces Theo blogged about.<br />
I guess maybe the reason they left that information in the release swf by default is to enable developers logging their apps.<br />
Hmm..and maybe not.</p>
<p>Cheers,<br />
Almog Kurtser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Williams</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58356</link>
		<dc:creator>Glenn Williams</dc:creator>
		<pubDate>Fri, 22 Feb 2008 15:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58356</guid>
		<description>Hi, 

nice little trick.

Is that a new version of flexSpy, or just one you've hacked together. I'll like the source if you're making it available.

cheers
glenn
</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>nice little trick.</p>
<p>Is that a new version of flexSpy, or just one you&#8217;ve hacked together. I&#8217;ll like the source if you&#8217;re making it available.</p>
<p>cheers<br />
glenn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johannes</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58340</link>
		<dc:creator>johannes</dc:creator>
		<pubDate>Fri, 22 Feb 2008 12:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58340</guid>
		<description>as you have the debug player it should work. try on a virgin machine with the normal runtime.

arguments.caller was very handy for event listener clean up in the past, pity tis gone when using anon functions with event listeners.</description>
		<content:encoded><![CDATA[<p>as you have the debug player it should work. try on a virgin machine with the normal runtime.</p>
<p>arguments.caller was very handy for event listener clean up in the past, pity tis gone when using anon functions with event listeners.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58338</link>
		<dc:creator>Theo</dc:creator>
		<pubDate>Fri, 22 Feb 2008 12:21:11 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58338</guid>
		<description>The source paths in square brackets comes from the verbose-stacktraces compiler flag. See my post on the subject: http://blog.iconara.net/2007/11/22/mxmlc-wtf-7-snooping-with-verbose-stacktraces/</description>
		<content:encoded><![CDATA[<p>The source paths in square brackets comes from the verbose-stacktraces compiler flag. See my post on the subject: <a href="http://blog.iconara.net/2007/11/22/mxmlc-wtf-7-snooping-with-verbose-stacktraces/" rel="nofollow">http://blog.iconara.net/2007/11/22/mxmlc-wtf-7-snooping-with-verbose-stacktraces/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58247</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Fri, 22 Feb 2008 03:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58247</guid>
		<description>@Alan, hmm, interesting. All I know is that in my blog post I tried embedding a version of the app that I exported as a release build with FB 3 B3 and the getStackTrace() stuff didn't work when I viewed it on the web page (maybe my player didn't know it was supposd to be in debug mode?). So then I just re-uploaded the version that was the normal debug swf and it all worked fine for me.</description>
		<content:encoded><![CDATA[<p>@Alan, hmm, interesting. All I know is that in my blog post I tried embedding a version of the app that I exported as a release build with FB 3 B3 and the getStackTrace() stuff didn&#8217;t work when I viewed it on the web page (maybe my player didn&#8217;t know it was supposd to be in debug mode?). So then I just re-uploaded the version that was the normal debug swf and it all worked fine for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Shaw</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58241</link>
		<dc:creator>Alan Shaw</dc:creator>
		<pubDate>Fri, 22 Feb 2008 02:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58241</guid>
		<description>Although the documentation says getStackTrace() will return null if not using the debugger version of the player, that doesn't mean that it will return null in a release build played in the debugger version of the player.  The source information in the square brackets is missing, but the function names are still there.  This version of functionName() works for me in either a debug or release build (current FB 3 beta):

package
{
    public function functionName():String
    {
        var s:String = new Error().getStackTrace();
        s = s.substring(s.indexOf("at") + 2);
        var i:int = s.indexOf("at") + 3;
        var j:int = s.indexOf("()", i);
        return s.substring(i, j);
    }
}</description>
		<content:encoded><![CDATA[<p>Although the documentation says getStackTrace() will return null if not using the debugger version of the player, that doesn&#8217;t mean that it will return null in a release build played in the debugger version of the player.  The source information in the square brackets is missing, but the function names are still there.  This version of functionName() works for me in either a debug or release build (current FB 3 beta):</p>
<p>package<br />
{<br />
    public function functionName():String<br />
    {<br />
        var s:String = new Error().getStackTrace();<br />
        s = s.substring(s.indexOf(&#8221;at&#8221;) + 2);<br />
        var i:int = s.indexOf(&#8221;at&#8221;) + 3;<br />
        var j:int = s.indexOf(&#8221;()&#8221;, i);<br />
        return s.substring(i, j);<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twitter Response from @axna &#171; TweetTrack</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58200</link>
		<dc:creator>Twitter Response from @axna &#171; TweetTrack</dc:creator>
		<pubDate>Thu, 21 Feb 2008 23:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58200</guid>
		<description>[...] February 21, 2008   Doug McCune - Sneaky Flex trick to get the name of any calling functions http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/ [...]</description>
		<content:encoded><![CDATA[<p>[...] February 21, 2008   Doug McCune - Sneaky Flex trick to get the name of any calling functions <a href="http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/" rel="nofollow">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dougmccune.com &#187; Blog Archive &#187; Monkey Patching FlexSprite to list all event listeners on any Flex component</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58189</link>
		<dc:creator>dougmccune.com &#187; Blog Archive &#187; Monkey Patching FlexSprite to list all event listeners on any Flex component</dc:creator>
		<pubDate>Thu, 21 Feb 2008 23:12:45 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-58189</guid>
		<description>[...] Contact      &#171; WindowShade component added to FlexLib Sneaky Flex trick to get the name of any calling functions &#187;      21 02 2008 [...]</description>
		<content:encoded><![CDATA[<p>[...] Contact      &laquo; WindowShade component added to FlexLib Sneaky Flex trick to get the name of any calling functions &raquo;      21 02 2008 [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
