<?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: Some tricks when switching to Robotlegs from PureMVC</title>
	<atom:link href="http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/</link>
	<description>Flash, ActionScript, SEO and everything in between</description>
	<lastBuildDate>Sat, 04 Feb 2012 08:16:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: zedia.net</title>
		<link>http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/comment-page-1/#comment-5347</link>
		<dc:creator>zedia.net</dc:creator>
		<pubDate>Sun, 01 Aug 2010 21:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=569#comment-5347</guid>
		<description>&lt;a href=&quot;#comment-5343&quot; rel=&quot;nofollow&quot;&gt;@ shaun&lt;/a&gt; 
Thank you for this, I had found out it wasn&#039;t working but didn&#039;t know why. I was using a workaround to do the same but it felt way dirty. Now I can do it the right way. Thank you .</description>
		<content:encoded><![CDATA[<p><a href="#comment-5343" rel="nofollow">@ shaun</a><br />
Thank you for this, I had found out it wasn&#8217;t working but didn&#8217;t know why. I was using a workaround to do the same but it felt way dirty. Now I can do it the right way. Thank you .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaun</title>
		<link>http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/comment-page-1/#comment-5343</link>
		<dc:creator>shaun</dc:creator>
		<pubDate>Sun, 01 Aug 2010 11:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=569#comment-5343</guid>
		<description>Hi, your advice regarding forced instantiation of instances is incorrect. I realize that it&#039;s a bit confusing, but &quot;instantiate&quot; does not do what you are expecting. What you are looking for is &quot;getInstance&quot;. The difference is quite subtle, but very important:

&quot;instantiate&quot; will always create a new instance of a class. It won&#039;t obey the mapping rules (like mapSingleton etc), it will simply construct a new instance of whatever class you pass it. It is used by things like the MediatorMap and CommandMap to construct new Mediators and Commands. It is a handy way to construct an instance and have it&#039;s dependencies satisfied without needing to set up any rules.

&quot;getInstance&quot; will retrieve (or create) an instance based on previously mapped rules. If a rule has not been set up an error will be thrown. If you have mapped something as a singleton getInstance will always return the same instance for that class/interface. Essentially, getInstance is what you&#039;d normally use.</description>
		<content:encoded><![CDATA[<p>Hi, your advice regarding forced instantiation of instances is incorrect. I realize that it&#8217;s a bit confusing, but &#8220;instantiate&#8221; does not do what you are expecting. What you are looking for is &#8220;getInstance&#8221;. The difference is quite subtle, but very important:</p>
<p>&#8220;instantiate&#8221; will always create a new instance of a class. It won&#8217;t obey the mapping rules (like mapSingleton etc), it will simply construct a new instance of whatever class you pass it. It is used by things like the MediatorMap and CommandMap to construct new Mediators and Commands. It is a handy way to construct an instance and have it&#8217;s dependencies satisfied without needing to set up any rules.</p>
<p>&#8220;getInstance&#8221; will retrieve (or create) an instance based on previously mapped rules. If a rule has not been set up an error will be thrown. If you have mapped something as a singleton getInstance will always return the same instance for that class/interface. Essentially, getInstance is what you&#8217;d normally use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kyoji</title>
		<link>http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/comment-page-1/#comment-4879</link>
		<dc:creator>kyoji</dc:creator>
		<pubDate>Sun, 14 Mar 2010 14:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=569#comment-4879</guid>
		<description>injector.mapSingleton(AppModel);
var appModel:AppModel = injector.instantiate(AppModel);
appModel.init(&quot;hello&quot;);

These dosen&#039;t work for me. I change that a bit:

var appModel:AppModel = new AppModel();
appModel.init(&quot;hello&quot;);
injector.mapValue(AppModel, appModel);

Bug? I am using v1.0.3</description>
		<content:encoded><![CDATA[<p>injector.mapSingleton(AppModel);<br />
var appModel:AppModel = injector.instantiate(AppModel);<br />
appModel.init(&#8220;hello&#8221;);</p>
<p>These dosen&#8217;t work for me. I change that a bit:</p>
<p>var appModel:AppModel = new AppModel();<br />
appModel.init(&#8220;hello&#8221;);<br />
injector.mapValue(AppModel, appModel);</p>
<p>Bug? I am using v1.0.3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joni</title>
		<link>http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/comment-page-1/#comment-4859</link>
		<dc:creator>Joni</dc:creator>
		<pubDate>Wed, 03 Mar 2010 18:55:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=569#comment-4859</guid>
		<description>Yes, that makes sense.

But I still see the same problem and can&#039;t figure it out yet.

Even if I inject the model into the mediator, I&#039;m injecting the entire model itself.

Is it possible to inject just one property?
I would say you have to use the mapValue function, but what happends if the value to be mapped (and then injected) is of type Number, or String? 

I&#039;ve tried naming the injection but couldn&#039;t make it to work.

Well, any ideas are of great help! Thanks!</description>
		<content:encoded><![CDATA[<p>Yes, that makes sense.</p>
<p>But I still see the same problem and can&#8217;t figure it out yet.</p>
<p>Even if I inject the model into the mediator, I&#8217;m injecting the entire model itself.</p>
<p>Is it possible to inject just one property?<br />
I would say you have to use the mapValue function, but what happends if the value to be mapped (and then injected) is of type Number, or String? </p>
<p>I&#8217;ve tried naming the injection but couldn&#8217;t make it to work.</p>
<p>Well, any ideas are of great help! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zedia.net</title>
		<link>http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/comment-page-1/#comment-4851</link>
		<dc:creator>zedia.net</dc:creator>
		<pubDate>Mon, 01 Mar 2010 22:08:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=569#comment-4851</guid>
		<description>If you what you want to do is to directly inject some Model data into your view without passing by the mediator, I would strongly advise against it. The logic behind PureMVC and I guess it is the same in Robotlegs is to keep the views framework agnostic, meaning they don&#039;t know anything about the framework they are in and could work in any. It is the mediator&#039;s job to do the communication between the framework and the view, so in this case you would inject the model in the mediator and the model would pass the data using a public method of the view. If you still want to do what you first wanted, I am not yet good enough with Robotlegs to answer that; you could ask on the Robotlegs forum. They would probably have an answer for you.</description>
		<content:encoded><![CDATA[<p>If you what you want to do is to directly inject some Model data into your view without passing by the mediator, I would strongly advise against it. The logic behind PureMVC and I guess it is the same in Robotlegs is to keep the views framework agnostic, meaning they don&#8217;t know anything about the framework they are in and could work in any. It is the mediator&#8217;s job to do the communication between the framework and the view, so in this case you would inject the model in the mediator and the model would pass the data using a public method of the view. If you still want to do what you first wanted, I am not yet good enough with Robotlegs to answer that; you could ask on the Robotlegs forum. They would probably have an answer for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joni</title>
		<link>http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/comment-page-1/#comment-4845</link>
		<dc:creator>Joni</dc:creator>
		<pubDate>Sun, 28 Feb 2010 02:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=569#comment-4845</guid>
		<description>Same here.
I have a question that maybe you (or anyone else) can answer:

I want to inject a property from a Model in a viewComponent (not a mediator).

Say you have a ImageGalleryModel, which has a property called showTime. It returns a Number indicating the amount of seconds the image should show.

So then I have an Image viewComponent and I want to Inject the showTime property from the ImageGalleryModel.

How could I do that? Any ideas?</description>
		<content:encoded><![CDATA[<p>Same here.<br />
I have a question that maybe you (or anyone else) can answer:</p>
<p>I want to inject a property from a Model in a viewComponent (not a mediator).</p>
<p>Say you have a ImageGalleryModel, which has a property called showTime. It returns a Number indicating the amount of seconds the image should show.</p>
<p>So then I have an Image viewComponent and I want to Inject the showTime property from the ImageGalleryModel.</p>
<p>How could I do that? Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Caballero</title>
		<link>http://www.zedia.net/2010/some-tricks-when-switching-to-robotlegs-from-puremvc/comment-page-1/#comment-4834</link>
		<dc:creator>Joel Caballero</dc:creator>
		<pubDate>Thu, 25 Feb 2010 21:47:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=569#comment-4834</guid>
		<description>Going through the same thing right now.  Thanks for shedding some light on it.</description>
		<content:encoded><![CDATA[<p>Going through the same thing right now.  Thanks for shedding some light on it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

