<?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: Spring ActionScript at FlexCamp 2008 Belgium</title>
	<atom:link href="http://www.herrodius.com/blog/158/feed" rel="self" type="application/rss+xml" />
	<link>http://www.herrodius.com/blog/158</link>
	<description>Thoughts from a software developer</description>
	<lastBuildDate>Wed, 10 Mar 2010 12:47:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ruprict</title>
		<link>http://www.herrodius.com/blog/158/comment-page-1#comment-13938</link>
		<dc:creator>Ruprict</dc:creator>
		<pubDate>Thu, 21 May 2009 21:08:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/158#comment-13938</guid>
		<description>Ugh...never mind.  -keep-as3-metadata Autowired</description>
		<content:encoded><![CDATA[<p>Ugh&#8230;never mind.  -keep-as3-metadata Autowired</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruprict</title>
		<link>http://www.herrodius.com/blog/158/comment-page-1#comment-13937</link>
		<dc:creator>Ruprict</dc:creator>
		<pubDate>Thu, 21 May 2009 20:52:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/158#comment-13937</guid>
		<description>So, I am trying to run this on a module after it&#039;s loaded, but the [Autowired] metadata nodes don&#039;t show up in the typeDescription.  The Bindable metadata is all there, and the var I decorated is there, it just doesn&#039;t have the Autowired metadata.   Any ideas what I am messing up?

Thanks,
Ruprict</description>
		<content:encoded><![CDATA[<p>So, I am trying to run this on a module after it&#8217;s loaded, but the [Autowired] metadata nodes don&#8217;t show up in the typeDescription.  The Bindable metadata is all there, and the var I decorated is there, it just doesn&#8217;t have the Autowired metadata.   Any ideas what I am messing up?</p>
<p>Thanks,<br />
Ruprict</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gordon</title>
		<link>http://www.herrodius.com/blog/158/comment-page-1#comment-13916</link>
		<dc:creator>Gordon</dc:creator>
		<pubDate>Fri, 24 Apr 2009 17:53:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/158#comment-13916</guid>
		<description>This method is very appealing, however have you seen a noticeable performance impact? It seems like it could be expensive using as3 &quot;reflection&quot; (parsing an xml document) every time any UIComponent in the application is added as a child to something.</description>
		<content:encoded><![CDATA[<p>This method is very appealing, however have you seen a noticeable performance impact? It seems like it could be expensive using as3 &#8220;reflection&#8221; (parsing an xml document) every time any UIComponent in the application is added as a child to something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TK</title>
		<link>http://www.herrodius.com/blog/158/comment-page-1#comment-13899</link>
		<dc:creator>TK</dc:creator>
		<pubDate>Tue, 07 Apr 2009 21:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/158#comment-13899</guid>
		<description>[property file=&quot;something.properties&quot;/]

Wish it were that easy in Spring proper :) Good job Christophe! Way to go, team!
And I love the &quot;method-invocation&quot; tag, by the way :)</description>
		<content:encoded><![CDATA[<p>[property file="something.properties"/]</p>
<p>Wish it were that easy in Spring proper <img src='http://www.herrodius.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Good job Christophe! Way to go, team!<br />
And I love the &#8220;method-invocation&#8221; tag, by the way <img src='http://www.herrodius.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christophe Herreman</title>
		<link>http://www.herrodius.com/blog/158/comment-page-1#comment-13833</link>
		<dc:creator>Christophe Herreman</dc:creator>
		<pubDate>Mon, 02 Mar 2009 11:30:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/158#comment-13833</guid>
		<description>Yes, I should have updated the code since that method has changed a bit since this post was published.

Here is a newer version of the autowiring code. It does not use AS3Reflect for performance reasons.

You&#039;ll manually need to import the following:
import mx.utils.DescribeTypeCache;
import mx.utils.DescribeTypeCacheRecord;

(I&#039;ll also update the code)

***

private function onAdded(event:Event):void {
				var autowiredObject:Object = event.target;
				var typeInfo:DescribeTypeCacheRecord = DescribeTypeCache.describeType(autowiredObject);

				for each (var metaDataNode:XML in typeInfo.typeDescription..metadata) {
					if (metaDataNode.attribute(&quot;name&quot;) == &quot;Autowired&quot;) {
						var propertyNode:XML = metaDataNode.parent();
						var property:String = propertyNode.@name.toString();
						var objectName:String = property;
						var autowireByType:Boolean = true;

						for each (var arg:XML in metaDataNode.arg) {
							if (arg.attribute(&quot;value&quot;) == &quot;byName&quot;) {
								autowireByType = false;
							}
						}
						
						if (autowireByType) {
							var clazz:Class = ClassUtils.forName(propertyNode.@type.toString());
							var objectNames:Array = m_applicationContext.getObjectNamesForType(clazz);
							if (objectNames.length == 1) {
								objectName = objectNames[0];
							}
						}
						
						autowiredObject[property] = m_applicationContext.getObject(objectName);
					}
				}
			}</description>
		<content:encoded><![CDATA[<p>Yes, I should have updated the code since that method has changed a bit since this post was published.</p>
<p>Here is a newer version of the autowiring code. It does not use AS3Reflect for performance reasons.</p>
<p>You&#8217;ll manually need to import the following:<br />
import mx.utils.DescribeTypeCache;<br />
import mx.utils.DescribeTypeCacheRecord;</p>
<p>(I&#8217;ll also update the code)</p>
<p>***</p>
<p>private function onAdded(event:Event):void {<br />
				var autowiredObject:Object = event.target;<br />
				var typeInfo:DescribeTypeCacheRecord = DescribeTypeCache.describeType(autowiredObject);</p>
<p>				for each (var metaDataNode:XML in typeInfo.typeDescription..metadata) {<br />
					if (metaDataNode.attribute(&#8220;name&#8221;) == &#8220;Autowired&#8221;) {<br />
						var propertyNode:XML = metaDataNode.parent();<br />
						var property:String = <a href="mailto:propertyNode.@name.toString">propertyNode.@name.toString</a>();<br />
						var objectName:String = property;<br />
						var autowireByType:Boolean = true;</p>
<p>						for each (var arg:XML in metaDataNode.arg) {<br />
							if (arg.attribute(&#8220;value&#8221;) == &#8220;byName&#8221;) {<br />
								autowireByType = false;<br />
							}<br />
						}</p>
<p>						if (autowireByType) {<br />
							var clazz:Class = ClassUtils.forName(propertyNode.@type.toString());<br />
							var objectNames:Array = m_applicationContext.getObjectNamesForType(clazz);<br />
							if (objectNames.length == 1) {<br />
								objectName = objectNames[0];<br />
							}<br />
						}</p>
<p>						autowiredObject[property] = m_applicationContext.getObject(objectName);<br />
					}<br />
				}<br />
			}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magomarcelo</title>
		<link>http://www.herrodius.com/blog/158/comment-page-1#comment-13832</link>
		<dc:creator>magomarcelo</dc:creator>
		<pubDate>Mon, 02 Mar 2009 10:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/158#comment-13832</guid>
		<description>I&#039;m trying to use autowiring but with the latest Spring ActionScript 0.7.1 and the version of as3reflect included I get an array when I call accessor.getMetaData(&quot;Autowired&quot;) instead of a single MetaData object</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to use autowiring but with the latest Spring ActionScript 0.7.1 and the version of as3reflect included I get an array when I call accessor.getMetaData(&#8220;Autowired&#8221;) instead of a single MetaData object</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lieven Cardoen Infrarood</title>
		<link>http://www.herrodius.com/blog/158/comment-page-1#comment-13771</link>
		<dc:creator>Lieven Cardoen Infrarood</dc:creator>
		<pubDate>Sat, 13 Dec 2008 14:54:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/158#comment-13771</guid>
		<description>Hi Herrodius, hopefully some people understood some things you said ;-)!

Keep it up!

Grab a bite somewhere next week?</description>
		<content:encoded><![CDATA[<p>Hi Herrodius, hopefully some people understood some things you said <img src='http://www.herrodius.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> !</p>
<p>Keep it up!</p>
<p>Grab a bite somewhere next week?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
