<?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: 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>
	<lastBuildDate>Tue, 16 Mar 2010 15:47:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: The getStackTrace Super Bug @ Bill White&#8217;s Blog</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/comment-page-1/#comment-208246</link>
		<dc:creator>The getStackTrace Super Bug @ Bill White&#8217;s Blog</dc:creator>
		<pubDate>Mon, 03 Aug 2009 23:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-208246</guid>
		<description>[...] made good use of a tip I picked up from McCune on generating a stacktrace in my logging statements so that I can not only see the method that was [...]</description>
		<content:encoded><![CDATA[<p>[...] made good use of a tip I picked up from McCune on generating a stacktrace in my logging statements so that I can not only see the method that was [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Error.getStackTrace() Smart Bug @ Bill White&#8217;s Blog</title>
		<link>http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/comment-page-1/#comment-208232</link>
		<dc:creator>The Error.getStackTrace() Smart Bug @ Bill White&#8217;s Blog</dc:creator>
		<pubDate>Thu, 30 Jul 2009 21:07:30 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2008/02/21/sneaky-flex-trick-to-get-the-name-of-any-calling-functions/#comment-208232</guid>
		<description>[...] made good use of a tip I picked up from McCune on generating a stacktrace in my logging statements so that I can not only see the method that was [...]</description>
		<content:encoded><![CDATA[<p>[...] made good use of a tip I picked up from McCune on generating a stacktrace in my logging statements so that I can not only see the method that was [...]</p>
]]></content:encoded>
	</item>
	<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-page-1/#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&#039;re running the debugger, you can see the stack trace at any time within the Debug panel.  What&#039;s also nice is that if you&#039;re on a breakpoint, you can click on any of the items in the stack in that panel to switch to that object&#039;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-page-1/#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&#039;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-page-1/#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&#039;s really nice monkey you&#039;ve got :)

I think Theo and Johannes are right, mxmlc keeps the stack trace in both debug and release, it&#039;s a matter of flash player version.
I wasn&#039;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-page-1/#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&#039;ve hacked together. I&#039;ll like the source if you&#039;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-page-1/#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-page-1/#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-page-1/#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&#039;t work when I viewed it on the web page (maybe my player didn&#039;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-page-1/#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&#039;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(&quot;at&quot;) + 2);
        var i:int = s.indexOf(&quot;at&quot;) + 3;
        var j:int = s.indexOf(&quot;()&quot;, 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(&#8220;at&#8221;) + 2);<br />
        var i:int = s.indexOf(&#8220;at&#8221;) + 3;<br />
        var j:int = s.indexOf(&#8220;()&#8221;, i);<br />
        return s.substring(i, j);<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
