<?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: Query the Loaded Classes in Flex / AS3</title>
	<atom:link href="http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/</link>
	<description>Rich Internet Applications &#124; Flex &#124; Adobe AIR &#124; Java &#124; Open Source &#124; Linux &#124; Enterprise Software &#124; Cloud</description>
	<lastBuildDate>Wed, 08 Sep 2010 19:33:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: James Ward</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157934</link>
		<dc:creator>James Ward</dc:creator>
		<pubDate>Tue, 22 Sep 2009 11:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157934</guid>
		<description>Hi Vivian,

Please email me so we can figure out a time that might work.  jaward at adobe dot com

-James</description>
		<content:encoded><![CDATA[<p>Hi Vivian,</p>
<p>Please email me so we can figure out a time that might work.  jaward at adobe dot com</p>
<p>-James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivian</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157933</link>
		<dc:creator>Vivian</dc:creator>
		<pubDate>Mon, 21 Sep 2009 16:00:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157933</guid>
		<description>James, I am from SF bayarea and its been a while since  you came and delivered any presentation here in San Francisco or San Jose! How can we schedule couple of events with you here in the bay area. By the way our user group name in Silvafug and we meet in Adobe offices in SF and SJ, twice every month. You have been to our meetings before but that was long time back.</description>
		<content:encoded><![CDATA[<p>James, I am from SF bayarea and its been a while since  you came and delivered any presentation here in San Francisco or San Jose! How can we schedule couple of events with you here in the bay area. By the way our user group name in Silvafug and we meet in Adobe offices in SF and SJ, twice every month. You have been to our meetings before but that was long time back.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Ward</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157925</link>
		<dc:creator>James Ward</dc:creator>
		<pubDate>Fri, 18 Sep 2009 14:46:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157925</guid>
		<description>Hi Matt,

Thanks for clarifying.  Classes don&#039;t get linked in unless they are explicitly referenced.  In the full source you can see how I force that:
&lt;pre lang=&quot;actionscript&quot;&gt;
    if (0)
    {
      var someClasses:SomeClasses = new SomeClasses();
    }
&lt;/pre&gt;

-James</description>
		<content:encoded><![CDATA[<p>Hi Matt,</p>
<p>Thanks for clarifying.  Classes don&#8217;t get linked in unless they are explicitly referenced.  In the full source you can see how I force that:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">var</span> someClasses:SomeClasses = <span style="color: #000000; font-weight: bold;">new</span> SomeClasses<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>-James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Bolt</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157924</link>
		<dc:creator>Matt Bolt</dc:creator>
		<pubDate>Fri, 18 Sep 2009 14:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157924</guid>
		<description>You might want to note that when using SWCs, this will not work unless it is fully included. Otherwise, the class has to be referenced prior to the &quot;search&quot; as flash uses an on demand system for library classes. Otherwise, hats off to you! Great little tool!</description>
		<content:encoded><![CDATA[<p>You might want to note that when using SWCs, this will not work unless it is fully included. Otherwise, the class has to be referenced prior to the &#8220;search&#8221; as flash uses an on demand system for library classes. Otherwise, hats off to you! Great little tool!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Ward</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157920</link>
		<dc:creator>James Ward</dc:creator>
		<pubDate>Thu, 17 Sep 2009 12:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157920</guid>
		<description>The new more cleaner code based on Roland&#039;s suggestions is:
&lt;pre lang=&quot;actionscript&quot;&gt;
    var a:Array = getDefinitionNames(systemManager.loaderInfo);
    
    allClasses.dataProvider = a;
    
    ifooClasses.dataProvider = new ArrayCollection();
    metafooClasses.dataProvider = new ArrayCollection();
    
    for each (var cn:String in a)
    {
      var t:Type = Type.forName(cn);

      if (t.hasMetaData(&quot;MetaFoo&quot;))
      {
        metafooClasses.dataProvider.addItem(cn);
      }
      
      if (ClassUtils.isImplementationOf(t.clazz, IFoo);
      {
        ifooClasses.dataProvider.addItem(cn);
      }
    }
&lt;/pre&gt;

Much nicer!  Thanks again Roland.

-James</description>
		<content:encoded><![CDATA[<p>The new more cleaner code based on Roland&#8217;s suggestions is:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">var</span> a:<span style="color: #0066CC;">Array</span> = getDefinitionNames<span style="color: #66cc66;">&#40;</span>systemManager.<span style="color: #006600;">loaderInfo</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    allClasses.<span style="color: #006600;">dataProvider</span> = a;
&nbsp;
    ifooClasses.<span style="color: #006600;">dataProvider</span> = <span style="color: #000000; font-weight: bold;">new</span> ArrayCollection<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    metafooClasses.<span style="color: #006600;">dataProvider</span> = <span style="color: #000000; font-weight: bold;">new</span> ArrayCollection<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> cn:<span style="color: #0066CC;">String</span> <span style="color: #b1b100;">in</span> a<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">var</span> t:<span style="color: #0066CC;">Type</span> = <span style="color: #0066CC;">Type</span>.<span style="color: #006600;">forName</span><span style="color: #66cc66;">&#40;</span>cn<span style="color: #66cc66;">&#41;</span>;
&nbsp;
      <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>t.<span style="color: #006600;">hasMetaData</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;MetaFoo&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#123;</span>
        metafooClasses.<span style="color: #006600;">dataProvider</span>.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span>cn<span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span>
&nbsp;
      <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ClassUtils.<span style="color: #006600;">isImplementationOf</span><span style="color: #66cc66;">&#40;</span>t.<span style="color: #006600;">clazz</span>, IFoo<span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#123;</span>
        ifooClasses.<span style="color: #006600;">dataProvider</span>.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span>cn<span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Much nicer!  Thanks again Roland.</p>
<p>-James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich Rodecker</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157918</link>
		<dc:creator>Rich Rodecker</dc:creator>
		<pubDate>Wed, 16 Sep 2009 20:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157918</guid>
		<description>Wow, I was just in need of this stuff this morning, thanks!</description>
		<content:encoded><![CDATA[<p>Wow, I was just in need of this stuff this morning, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Johnson</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157917</link>
		<dc:creator>Ben Johnson</dc:creator>
		<pubDate>Wed, 16 Sep 2009 20:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157917</guid>
		<description>I was actually trying to figure out a solution for this last night.  Thanks for the timely post, James.</description>
		<content:encoded><![CDATA[<p>I was actually trying to figure out a solution for this last night.  Thanks for the timely post, James.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Ward</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157914</link>
		<dc:creator>James Ward</dc:creator>
		<pubDate>Wed, 16 Sep 2009 18:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157914</guid>
		<description>Awesome!  Thanks Roland!  That simplifies the code quite a bit.

-James</description>
		<content:encoded><![CDATA[<p>Awesome!  Thanks Roland!  That simplifies the code quite a bit.</p>
<p>-James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland Zwaga</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157913</link>
		<dc:creator>Roland Zwaga</dc:creator>
		<pubDate>Wed, 16 Sep 2009 18:36:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157913</guid>
		<description>Hehe, ow, and while I&#039;m at it, the Type class has a hasMetaData() method:

t.hasMetaData(&quot;MetaFoo&quot;);</description>
		<content:encoded><![CDATA[<p>Hehe, ow, and while I&#8217;m at it, the Type class has a hasMetaData() method:</p>
<p>t.hasMetaData(&#8220;MetaFoo&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland Zwaga</title>
		<link>http://www.jamesward.com/2009/09/16/query-the-loaded-classes-in-flex-as3/comment-page-1/#comment-157912</link>
		<dc:creator>Roland Zwaga</dc:creator>
		<pubDate>Wed, 16 Sep 2009 18:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.jamesward.com/blog/?p=1221#comment-157912</guid>
		<description>Nice post James!
One thing though, I think this would be a neater way of doing the interface check:

ClassUtils.isImplementationOf(t.clazz, IFoo);

cheers,

Roland</description>
		<content:encoded><![CDATA[<p>Nice post James!<br />
One thing though, I think this would be a neater way of doing the interface check:</p>
<p>ClassUtils.isImplementationOf(t.clazz, IFoo);</p>
<p>cheers,</p>
<p>Roland</p>
]]></content:encoded>
	</item>
</channel>
</rss>
