<?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: Flex, ColdFusion &#8211; RemoteObject HelloWorld Application</title>
	<atom:link href="http://www.newtriks.com/?feed=rss2&#038;p=129" rel="self" type="application/rss+xml" />
	<link>http://www.newtriks.com/?p=129</link>
	<description>Flex, Flash &#38; AIR Development</description>
	<lastBuildDate>Sun, 05 Sep 2010 01:10:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: newtriks</title>
		<link>http://www.newtriks.com/?p=129&#038;cpage=1#comment-30270</link>
		<dc:creator>newtriks</dc:creator>
		<pubDate>Fri, 13 Feb 2009 18:13:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=129#comment-30270</guid>
		<description>Marcio try popping it in a CreationComplete event instead of initialize.</description>
		<content:encoded><![CDATA[<p>Marcio try popping it in a CreationComplete event instead of initialize.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MArcio</title>
		<link>http://www.newtriks.com/?p=129&#038;cpage=1#comment-30269</link>
		<dc:creator>MArcio</dc:creator>
		<pubDate>Fri, 13 Feb 2009 17:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=129#comment-30269</guid>
		<description>Why does not work that way

I added the following code to the file EntryForm.mxml

initialize=&quot;onInitialize();&quot;

public function onInitialize():void
{
sendEvent( CALL_HELLO );
}


???</description>
		<content:encoded><![CDATA[<p>Why does not work that way</p>
<p>I added the following code to the file EntryForm.mxml</p>
<p>initialize=&#8221;onInitialize();&#8221;</p>
<p>public function onInitialize():void<br />
{<br />
sendEvent( CALL_HELLO );<br />
}</p>
<p>???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: newtriks</title>
		<link>http://www.newtriks.com/?p=129&#038;cpage=1#comment-29512</link>
		<dc:creator>newtriks</dc:creator>
		<pubDate>Fri, 18 Jul 2008 07:53:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=129#comment-29512</guid>
		<description>Cool, basically I define a method in the delegate like:

[as]
public function callCFC( method:String ):void 
{
	// Call the service
	var token:AsyncToken = ro[method].send();
	// Notify this responder when the service call completes
	token.addResponder( this.responder );
}
[/as]

And in a proxy I simple call this method like:

[as]
callCFC(&#039;makeRemoteCall&#039;);
[/as]

Obviously you can add further arguments to pass if need be, it does get a little tricky when passing value objects as to maintain the logic that will have to be detailed in the delegate accordingly, but as you can see is hardly any leg work at all (see example below), you could always replaye item:ItemVO with item:* and that would enable you to pass any Object through that method.

[as]
public function callCFC( method:String, item:ItemVO ):void 
{
	// Call the service
	var token:AsyncToken = ro[method].send( item );
	// Notify this responder when the service call completes
	token.addResponder( this.responder );
}
[/as]</description>
		<content:encoded><![CDATA[<p>Cool, basically I define a method in the delegate like:</p>
<div class="igBar"><span id="lactionscript-1"><a href="#" onclick="javascript:showPlainTxt('actionscript-1'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-1">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> callCFC<span style="color: #66cc66;">&#40;</span> method:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Call the service</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> token:AsyncToken = ro<span style="color: #66cc66;">&#91;</span>method<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Notify this responder when the service call completes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; token.<span style="color: #006600;">addResponder</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">responder</span> <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>And in a proxy I simple call this method like:</p>
<div class="igBar"><span id="lactionscript-2"><a href="#" onclick="javascript:showPlainTxt('actionscript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-2">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">callCFC<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'makeRemoteCall'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Obviously you can add further arguments to pass if need be, it does get a little tricky when passing value objects as to maintain the logic that will have to be detailed in the delegate accordingly, but as you can see is hardly any leg work at all (see example below), you could always replaye item:ItemVO with item:* and that would enable you to pass any Object through that method.</p>
<div class="igBar"><span id="lactionscript-3"><a href="#" onclick="javascript:showPlainTxt('actionscript-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-3">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> callCFC<span style="color: #66cc66;">&#40;</span> method:<span style="color: #0066CC;">String</span>, item:ItemVO <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Call the service</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> token:AsyncToken = ro<span style="color: #66cc66;">&#91;</span>method<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span> item <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Notify this responder when the service call completes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; token.<span style="color: #006600;">addResponder</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">responder</span> <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.newtriks.com/?p=129&#038;cpage=1#comment-29511</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 18 Jul 2008 03:32:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=129#comment-29511</guid>
		<description>Thanks for the code.  Can you go in a little more detail about your remote delegates in how it allows you to re-use the classes in other applications.  How can this be?  You are defining application specific functions in your delegate.  How could this be re-used in another application.  Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for the code.  Can you go in a little more detail about your remote delegates in how it allows you to re-use the classes in other applications.  How can this be?  You are defining application specific functions in your delegate.  How could this be re-used in another application.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pages tagged "basic"</title>
		<link>http://www.newtriks.com/?p=129&#038;cpage=1#comment-29501</link>
		<dc:creator>Pages tagged "basic"</dc:creator>
		<pubDate>Wed, 16 Jul 2008 11:25:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.newtriks.com/?p=129#comment-29501</guid>
		<description>[...] bookmarks tagged basic Flex, ColdFusion - RemoteObject HelloWorld Applica...&#160;saved by 3 others  &#160;&#160;&#160;&#160;shppden bookmarked on 07/16/08 &#124; [...]</description>
		<content:encoded><![CDATA[<p>[...] bookmarks tagged basic Flex, ColdFusion - RemoteObject HelloWorld Applica...&nbsp;saved by 3 others  &nbsp;&nbsp;&nbsp;&nbsp;shppden bookmarked on 07/16/08 | [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
