View Full Version : Relayresponder is not working second time around
Syco54645
08-27-2007, 03:28 PM
Hello,
I am having some strange problems with my amfphp demo that I am working on. The code is located at these links
php: http://pastebin.ca/672300
as: http://pastebin.ca/672298
When I hit the "view" button it does the call to amf and the result shows up in the netdebugger, but the relayresponder is not calling the function. I have no idea what is wrong here as I am rather new to amfphp.
Any help would be greatly appreciated
-Frank
Syco54645
08-28-2007, 05:33 PM
problem solved
Junkman
08-31-2007, 03:52 AM
problem solved
I am having the exact same problem. Any enlightenment on what you found?
Junkman
08-31-2007, 04:48 AM
It seems that how you call your function with the RelayReponder defined makes a huge difference:
For example, this does not work:
lsbClubListing.addEventListener("change", getTheEventListing);
But this does:
var oListListener:Object = new Object();
oListListener.change = function(oEvent:Object) {
trace(oEvent.target + " was just clicked");
getTheEventListing();
};
lsbClubListing.addEventListener("change", oListListener);
Hope that helps the next guy. Nothings for free! :o
the ev
09-14-2007, 09:04 AM
@Junkman - Having the same problem with Fluorine, but I'm not sure I understand your solution. Here's my code:
import mx.remoting.*;
import mx.rpc.*;
import mx.remoting.debug.NetDebug;
var _service:Service = new Service("gateway.aspx", null, 'FlRemotingLogic.Remoting', null , null);
var pc:PendingCall = _service.GetThumbNum();
pc.responder = new RelayResponder(this, "handleResult", "handleError");
function handleResult (re:ResultEvent):Void
{
// arrayItemsNumber = re.result;
trace('The result is: ' + re.result);
// populateArray();
// maxCount = items.length;
// thumnailDelay();
}
function handleError(fe:FaultEvent):Void
{
trace('There has been an error');
}
The NetDebugger reports a successful call, but nothing inside the handleResult function seems to execute?? What am I doing wrong?!
the ev
09-14-2007, 10:17 PM
Hmm... if I ditch the RelayResponder altogether, and do this instead:
var pc:PendingCall = service.GetThumbNum();
pc.onResult = function (re:ResultEvent)
{
trace("Stuff happened!");
}
...the code block executes on a successful call.
Unless someone can explain why RelayResponder isn't working, I suppose I'll go with this for the time being...
Junkman
09-30-2007, 03:28 AM
I am no expert, but I can do different things expecting different behavior!
May be someone with more code under their belt might be able to explain?
@Junkman - Having the same problem with Fluorine, but I'm not sure I understand your solution. Here's my code:
import mx.remoting.*;
import mx.rpc.*;
import mx.remoting.debug.NetDebug;
var _service:Service = new Service("gateway.aspx", null, 'FlRemotingLogic.Remoting', null , null);
var pc:PendingCall = _service.GetThumbNum();
pc.responder = new RelayResponder(this, "handleResult", "handleError");
function handleResult (re:ResultEvent):Void
{
// arrayItemsNumber = re.result;
trace('The result is: ' + re.result);
// populateArray();
// maxCount = items.length;
// thumnailDelay();
}
function handleError(fe:FaultEvent):Void
{
trace('There has been an error');
}
The NetDebugger reports a successful call, but nothing inside the handleResult function seems to execute?? What am I doing wrong?!
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.