<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Flash Remoting: Error-proofing the Connection class</title>
	<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/</link>
	<description></description>
	<pubDate>Thu, 04 Dec 2008 21:21:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: hairy</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-16523</link>
		<dc:creator>hairy</dc:creator>
		<pubDate>Mon, 24 Mar 2008 09:11:39 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-16523</guid>
		<description>ya rite but some times its not work yaar. Give me some more info</description>
		<content:encoded><![CDATA[<p>ya rite but some times its not work yaar. Give me some more info</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mammut</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-15959</link>
		<dc:creator>mammut</dc:creator>
		<pubDate>Thu, 21 Feb 2008 10:29:53 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-15959</guid>
		<description>Is there a similar solution in AS3 ?
Thanks</description>
		<content:encoded><![CDATA[<p>Is there a similar solution in AS3 ?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Digi</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-10876</link>
		<dc:creator>Digi</dc:creator>
		<pubDate>Wed, 15 Aug 2007 15:00:25 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-10876</guid>
		<description>For anyone who was attempting to use Ezequiel's method and wasn't successful, modify the following line:

var service:Service = new Service(null, null, ‘HelloWorld’, conn);

to become:

var service:Service = new Service(null, null, ‘HelloWorld’, conn, this);

That seemed to do the trick for me.</description>
		<content:encoded><![CDATA[<p>For anyone who was attempting to use Ezequiel&#8217;s method and wasn&#8217;t successful, modify the following line:</p>
<p>var service:Service = new Service(null, null, ‘HelloWorld’, conn);</p>
<p>to become:</p>
<p>var service:Service = new Service(null, null, ‘HelloWorld’, conn, this);</p>
<p>That seemed to do the trick for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mecanography</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-4619</link>
		<dc:creator>mecanography</dc:creator>
		<pubDate>Mon, 19 Mar 2007 15:38:30 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-4619</guid>
		<description>@Bernardo_Kuri

try to publish for Flash 7 to see if it fix the type mismatch error. If so when publishing for Flash 8 define service like this :
[code]
var service:Service = new mx.remoting.Service(gatewayUrl, null, 'HelloWorld'); 
[/code]
Seems AS2 in Flash8 doesn't understand well 'new Service' it needs 'new mx.remoting.Service' for not issuing a type error... I eventually ran amok before seeing this page : http://yawoong.com/board/view.php?id=tutorial_kidari70&#38;no=127</description>
		<content:encoded><![CDATA[<p>@Bernardo_Kuri</p>
<p>try to publish for Flash 7 to see if it fix the type mismatch error. If so when publishing for Flash 8 define service like this :<br />
[code]<br />
var service:Service = new mx.remoting.Service(gatewayUrl, null, &#8216;HelloWorld&#8217;);<br />
[/code]<br />
Seems AS2 in Flash8 doesn&#8217;t understand well &#8216;new Service&#8217; it needs &#8216;new mx.remoting.Service&#8217; for not issuing a type error&#8230; I eventually ran amok before seeing this page : <a href="http://yawoong.com/board/view.php?id=tutorial_kidari70&amp;no=127" rel="nofollow">http://yawoong.com/board/view.php?id=tutorial_kidari70&amp;no=127</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: enrique vamp</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-4599</link>
		<dc:creator>enrique vamp</dc:creator>
		<pubDate>Mon, 19 Mar 2007 06:16:46 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-4599</guid>
		<description>If any one change the gatewayURL to mine (amfphp 1.2) and replace your service.whatever call so it works with my setup/function.</description>
		<content:encoded><![CDATA[<p>If any one change the gatewayURL to mine (amfphp 1.2) and replace your service.whatever call so it works with my setup/function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-2717</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Fri, 02 Feb 2007 19:59:16 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-2717</guid>
		<description>Awesome code Ezequiel! I like your solution rather than patching core classes. Thanks a lot!

Damn it, it's so easy actually.. and I was looking for such a long time for a solution!

Thanks guys.</description>
		<content:encoded><![CDATA[<p>Awesome code Ezequiel! I like your solution rather than patching core classes. Thanks a lot!</p>
<p>Damn it, it&#8217;s so easy actually.. and I was looking for such a long time for a solution!</p>
<p>Thanks guys.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ezequiel</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-988</link>
		<dc:creator>Ezequiel</dc:creator>
		<pubDate>Sat, 23 Dec 2006 16:37:19 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-988</guid>
		<description>If you want avoid patching, you can make use of the connection argument passed to the Service class. For example:

var gatewayUrl:String = "http://dev.caleb.org/amfphp/gateway.php"
var conn:Connection = new Connection();
conn.onStatus = function( info ):Void
{
    if (info == undefined) {
        trace("The host can't be reached");
    } else {
        trace("onStatus: " + info.code);
    }
}
conn.connect(gatewayUrl);
var service:Service = new Service(null, null, 'HelloWorld', conn);
var pc:PendingCall = service.say("Hello world!");
pc.responder = new RelayResponder(this, "handleResult", "handleError");
function handleResult(re:ResultEvent)
{
    trace('The result is: ' + re.result);
}
function handleError(fe:FaultEvent)
{
    trace('There has been an error');
}

Hope that helps.</description>
		<content:encoded><![CDATA[<p>If you want avoid patching, you can make use of the connection argument passed to the Service class. For example:</p>
<p>var gatewayUrl:String = &#8220;http://dev.caleb.org/amfphp/gateway.php&#8221;<br />
var conn:Connection = new Connection();<br />
conn.onStatus = function( info ):Void<br />
{<br />
    if (info == undefined) {<br />
        trace(&#8221;The host can&#8217;t be reached&#8221;);<br />
    } else {<br />
        trace(&#8221;onStatus: &#8221; + info.code);<br />
    }<br />
}<br />
conn.connect(gatewayUrl);<br />
var service:Service = new Service(null, null, &#8216;HelloWorld&#8217;, conn);<br />
var pc:PendingCall = service.say(&#8221;Hello world!&#8221;);<br />
pc.responder = new RelayResponder(this, &#8220;handleResult&#8221;, &#8220;handleError&#8221;);<br />
function handleResult(re:ResultEvent)<br />
{<br />
    trace(&#8217;The result is: &#8216; + re.result);<br />
}<br />
function handleError(fe:FaultEvent)<br />
{<br />
    trace(&#8217;There has been an error&#8217;);<br />
}</p>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernardo Kuri</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-412</link>
		<dc:creator>Bernardo Kuri</dc:creator>
		<pubDate>Sat, 02 Dec 2006 07:04:57 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-412</guid>
		<description>Hello Caleb,

Thanks a lot for sharing this code! I wouldn't have known about this issue otherwise.

Unfortunately, I just can't get it to work properly. Adding 'this' as the last parameter for the service call will return a 'type mismatch' compiler error, and simply removing it (or adding a valid responder param) doesn't do anything at all (as in no RPC code gets executed). Changing to a valid gateway path does get things rolling again, although onStatus() never gets called either way.

I am using version 9.0r28 of the flash player. My code differs slightly from yours in that I'm adding a logger as a second parameter to my service call (in case this makes any difference).

Thanks for your time, and good luck on your business trip!</description>
		<content:encoded><![CDATA[<p>Hello Caleb,</p>
<p>Thanks a lot for sharing this code! I wouldn&#8217;t have known about this issue otherwise.</p>
<p>Unfortunately, I just can&#8217;t get it to work properly. Adding &#8216;this&#8217; as the last parameter for the service call will return a &#8216;type mismatch&#8217; compiler error, and simply removing it (or adding a valid responder param) doesn&#8217;t do anything at all (as in no RPC code gets executed). Changing to a valid gateway path does get things rolling again, although onStatus() never gets called either way.</p>
<p>I am using version 9.0r28 of the flash player. My code differs slightly from yours in that I&#8217;m adding a logger as a second parameter to my service call (in case this makes any difference).</p>
<p>Thanks for your time, and good luck on your business trip!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kay</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-284</link>
		<dc:creator>Kay</dc:creator>
		<pubDate>Wed, 15 Nov 2006 17:54:32 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-284</guid>
		<description>I tried your example and could not get it to fire any error. I even downloaded your files. And used those and still nothing. I modified both class files. I'm using flash 8 and publishing to 8 as well.</description>
		<content:encoded><![CDATA[<p>I tried your example and could not get it to fire any error. I even downloaded your files. And used those and still nothing. I modified both class files. I&#8217;m using flash 8 and publishing to 8 as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caleb</title>
		<link>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-188</link>
		<dc:creator>Caleb</dc:creator>
		<pubDate>Thu, 09 Nov 2006 12:14:55 +0000</pubDate>
		<guid>http://caleb.org/blog/uncategorized/flash-remoting-error-proofing-the-connection-class/#comment-188</guid>
		<description>Rui,

You are accurate in your observation that no status information is being dispatched with the onStatus method invocation.  I'll add that to my list of fixes to address when time permits ... thanks for the comment  :-)</description>
		<content:encoded><![CDATA[<p>Rui,</p>
<p>You are accurate in your observation that no status information is being dispatched with the onStatus method invocation.  I&#8217;ll add that to my list of fixes to address when time permits &#8230; thanks for the comment  <img src='http://caleb.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
