<?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: SSR 2 Breakdown</title>
	<atom:link href="http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/</link>
	<description>Ruby AMF - Flash Remoting for Ruby on Rails</description>
	<lastBuildDate>Tue, 25 Aug 2009 12:14:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: prism</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-202</link>
		<dc:creator>prism</dc:creator>
		<pubDate>Wed, 09 Jul 2008 04:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-202</guid>
		<description>You might want to look at this though

http://groups.google.com/group/rubyamf/browse_thread/thread/93825befb2f8bb09


For me, this works with Rails 2.1.0 (SQLite3), AMFRuby 1.6.2 + SSR2. I&#039;m building with Flash CS3.

Following the other tutorials on this, you have to remember to:

- Add ClassMappings to config/rubyamf_config.rb
- Modify controllers to support AMF


If it helps, here&#039;s my basic AS3:

[code]
package
{
import com.niarbtfel.remoting.RemotingService;
import com.niarbtfel.remoting.RemotingConnection;
import com.niarbtfel.remoting.events.FaultEvent;
import com.niarbtfel.remoting.events.ResultEvent;
import com.niarbtfel.remoting.events.ConnectionEvent;
import com.niarbtfel.remoting.events.CallEvent;
import flash.display.Sprite;
import fl.data.DataProvider;
import fl.controls.DataGrid;

	public class Main extends Sprite {
		private var rc:RemotingConnection;
		private var rs:RemotingService;
		private var acdp:ArrayCollectionDP;

		public function Main():void
		{
			rc = new RemotingConnection(&quot;http://localhost:3000/rubyamf/gateway&quot;,3);
			rc.addEventListener(ConnectionEvent.CONNECTED, onCConnect);
			rc.addEventListener(ConnectionEvent.FAILED, onCFail);
			rc.addEventListener(ConnectionEvent.DISCONNECT, onCDisconnect);
			rc.addEventListener(ConnectionEvent.FORMAT_ERROR, onCFormatError);
			rc.addEventListener(ConnectionEvent.SECURITY_ERROR, onCSecurityError);

			rs = new RemotingService(rc,&quot;UsersController&quot;,4000,3,true);
			rs.addEventListener(CallEvent.RETRY, onRetry);
			rs.addEventListener(CallEvent.TIMEOUT, onTimeout);

			//call the method.  (these two lines doe the same thing)
			rs.index([],onR,onF,true);
			// rs.apply(&quot;index&quot;,[],onR,onF,true);
		}

		private function onCFail(ce:ConnectionEvent):void
		{
			trace(&quot;onCFail&quot;);
		}
		private function onCConnect(ce:ConnectionEvent):void
		{
			trace(&quot;onCConnect&quot;);
		}
		private function onCDisconnect(ce:ConnectionEvent):void
		{
			trace(&quot;onCDisconnect&quot;);
		}
		private function onCFormatError(ce:ConnectionEvent):void
		{
			trace(&quot;onCFormatError&quot;);
		}
		private function onCSecurityError(ce:ConnectionEvent):void
		{
			trace(&quot;onCSecurityError&quot;);
		}

		private function onRetry(ce:CallEvent):void
		{
			trace(&quot;onRetry&quot;);
			trace(ce);
		}
		private function onTimeout(ce:CallEvent):void
		{
			trace(&quot;onTimeout&quot;);
		}

		private function onR(re:ResultEvent, args:Array):void
		{
			trace(&quot;onResult&quot;);
			var dp:DataProvider = new DataProvider(re.result);
			var dg:DataGrid = new DataGrid();
			dg.width = 400;
			dg.height = 200;
			dg.dataProvider = dp;
			addChild(dg);
		}
		private function onF(fe:FaultEvent, args:Array):void
		{
			trace(&quot;onFault&quot;);
		}

	}
}
[/code]



Thanks Aaron for RubyAMF and all the rest. :)</description>
		<content:encoded><![CDATA[<p>You might want to look at this though</p>
<p><a href="http://groups.google.com/group/rubyamf/browse_thread/thread/93825befb2f8bb09" rel="nofollow">http://groups.google.com/group/rubyamf/browse_thread/thread/93825befb2f8bb09</a></p>
<p>For me, this works with Rails 2.1.0 (SQLite3), AMFRuby 1.6.2 + SSR2. I&#8217;m building with Flash CS3.</p>
<p>Following the other tutorials on this, you have to remember to:</p>
<p>- Add ClassMappings to config/rubyamf_config.rb<br />
- Modify controllers to support AMF</p>
<p>If it helps, here&#8217;s my basic AS3:</p>
<p>[code]<br />
package<br />
{<br />
import com.niarbtfel.remoting.RemotingService;<br />
import com.niarbtfel.remoting.RemotingConnection;<br />
import com.niarbtfel.remoting.events.FaultEvent;<br />
import com.niarbtfel.remoting.events.ResultEvent;<br />
import com.niarbtfel.remoting.events.ConnectionEvent;<br />
import com.niarbtfel.remoting.events.CallEvent;<br />
import flash.display.Sprite;<br />
import fl.data.DataProvider;<br />
import fl.controls.DataGrid;</p>
<p>	public class Main extends Sprite {<br />
		private var rc:RemotingConnection;<br />
		private var rs:RemotingService;<br />
		private var acdp:ArrayCollectionDP;</p>
<p>		public function Main():void<br />
		{<br />
			rc = new RemotingConnection("http://localhost:3000/rubyamf/gateway",3);<br />
			rc.addEventListener(ConnectionEvent.CONNECTED, onCConnect);<br />
			rc.addEventListener(ConnectionEvent.FAILED, onCFail);<br />
			rc.addEventListener(ConnectionEvent.DISCONNECT, onCDisconnect);<br />
			rc.addEventListener(ConnectionEvent.FORMAT_ERROR, onCFormatError);<br />
			rc.addEventListener(ConnectionEvent.SECURITY_ERROR, onCSecurityError);</p>
<p>			rs = new RemotingService(rc,"UsersController",4000,3,true);<br />
			rs.addEventListener(CallEvent.RETRY, onRetry);<br />
			rs.addEventListener(CallEvent.TIMEOUT, onTimeout);</p>
<p>			//call the method.  (these two lines doe the same thing)<br />
			rs.index([],onR,onF,true);<br />
			// rs.apply("index",[],onR,onF,true);<br />
		}</p>
<p>		private function onCFail(ce:ConnectionEvent):void<br />
		{<br />
			trace("onCFail");<br />
		}<br />
		private function onCConnect(ce:ConnectionEvent):void<br />
		{<br />
			trace("onCConnect");<br />
		}<br />
		private function onCDisconnect(ce:ConnectionEvent):void<br />
		{<br />
			trace("onCDisconnect");<br />
		}<br />
		private function onCFormatError(ce:ConnectionEvent):void<br />
		{<br />
			trace("onCFormatError");<br />
		}<br />
		private function onCSecurityError(ce:ConnectionEvent):void<br />
		{<br />
			trace("onCSecurityError");<br />
		}</p>
<p>		private function onRetry(ce:CallEvent):void<br />
		{<br />
			trace("onRetry");<br />
			trace(ce);<br />
		}<br />
		private function onTimeout(ce:CallEvent):void<br />
		{<br />
			trace("onTimeout");<br />
		}</p>
<p>		private function onR(re:ResultEvent, args:Array):void<br />
		{<br />
			trace("onResult");<br />
			var dp:DataProvider = new DataProvider(re.result);<br />
			var dg:DataGrid = new DataGrid();<br />
			dg.width = 400;<br />
			dg.height = 200;<br />
			dg.dataProvider = dp;<br />
			addChild(dg);<br />
		}<br />
		private function onF(fe:FaultEvent, args:Array):void<br />
		{<br />
			trace("onFault");<br />
		}</p>
<p>	}<br />
}<br />
[/code]</p>
<p>Thanks Aaron for RubyAMF and all the rest. <img src='http://blog.rubyamf.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prism</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-201</link>
		<dc:creator>prism</dc:creator>
		<pubDate>Wed, 09 Jul 2008 03:20:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-201</guid>
		<description>giorgos, try with

re.result[0].attributes.memberID</description>
		<content:encoded><![CDATA[<p>giorgos, try with</p>
<p>re.result[0].attributes.memberID</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: giorgos</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-203</link>
		<dc:creator>giorgos</dc:creator>
		<pubDate>Tue, 15 Apr 2008 18:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-203</guid>
		<description>hi i am almost there, please need your help. trace(re.result) gives me back [object object]. In old days we used to do this trace(re.result[0].memberID); now what is the proper approach?

cheers</description>
		<content:encoded><![CDATA[<p>hi i am almost there, please need your help. trace(re.result) gives me back [object object]. In old days we used to do this trace(re.result[0].memberID); now what is the proper approach?</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CarnageBlood</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-200</link>
		<dc:creator>CarnageBlood</dc:creator>
		<pubDate>Sat, 09 Feb 2008 23:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-200</guid>
		<description>How can i get the downloading progress of an return ActiveRecord object? This is useful when retrieving alot of data ?
Can someone please explain me how pagging works and give an example?</description>
		<content:encoded><![CDATA[<p>How can i get the downloading progress of an return ActiveRecord object? This is useful when retrieving alot of data ?<br />
Can someone please explain me how pagging works and give an example?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Freddy</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-199</link>
		<dc:creator>Freddy</dc:creator>
		<pubDate>Thu, 07 Feb 2008 11:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-199</guid>
		<description>ok... I thought that format only work in flex (had not proven)... some example with setcredentials?</description>
		<content:encoded><![CDATA[<p>ok&#8230; I thought that format only work in flex (had not proven)&#8230; some example with setcredentials?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aaron</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-192</link>
		<dc:creator>aaron</dc:creator>
		<pubDate>Wed, 06 Feb 2008 19:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-192</guid>
		<description>@freddy,

yes it works in CS3.

Not sure what you&#039;re getting at with pointing out the CallEvent.RETRY. That is just meta data about what events are dispatched from RemotingService.

-Aaron</description>
		<content:encoded><![CDATA[<p>@freddy,</p>
<p>yes it works in CS3.</p>
<p>Not sure what you&#8217;re getting at with pointing out the CallEvent.RETRY. That is just meta data about what events are dispatched from RemotingService.</p>
<p>-Aaron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Freddy</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-191</link>
		<dc:creator>Freddy</dc:creator>
		<pubDate>Wed, 06 Feb 2008 10:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-191</guid>
		<description>I tell that because I seen this: &quot;[Event(name=CallEvent.RETRY,type=&quot;com.niarbtfel.remoting.events.CallEvent&quot;)];&quot;</description>
		<content:encoded><![CDATA[<p>I tell that because I seen this: &#8220;[Event(name=CallEvent.RETRY,type="com.niarbtfel.remoting.events.CallEvent")];&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Freddy</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-190</link>
		<dc:creator>Freddy</dc:creator>
		<pubDate>Wed, 06 Feb 2008 10:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-190</guid>
		<description>SSR2 works in flash cs3?</description>
		<content:encoded><![CDATA[<p>SSR2 works in flash cs3?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CarnageBlood</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-198</link>
		<dc:creator>CarnageBlood</dc:creator>
		<pubDate>Tue, 29 Jan 2008 20:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-198</guid>
		<description>The ResultEvent dispached!</description>
		<content:encoded><![CDATA[<p>The ResultEvent dispached!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CarnageBlood</title>
		<link>http://blog.rubyamf.org/2008/01/28/ssr-2-breakdown/comment-page-1/#comment-193</link>
		<dc:creator>CarnageBlood</dc:creator>
		<pubDate>Tue, 29 Jan 2008 20:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rubyamf.org/?p=103#comment-193</guid>
		<description>It works!Thanks alot!
Thow I have another quetion:
When does the ConnectionEvent.CONNECTED dispached because in that setup I managed to get data from PeopleController  and the CONNECTED event didn&#039;t dispach? In fact no RemotingConnection event was realy dispached!</description>
		<content:encoded><![CDATA[<p>It works!Thanks alot!<br />
Thow I have another quetion:<br />
When does the ConnectionEvent.CONNECTED dispached because in that setup I managed to get data from PeopleController  and the CONNECTED event didn&#8217;t dispach? In fact no RemotingConnection event was realy dispached!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
