all groups > macromedia flash flash remoting > november 2005 >
You're in the

macromedia flash flash remoting

group:

RelayResponder wont' call the result function


RelayResponder wont' call the result function boxdoctor
11/28/2005 5:04:04 PM
macromedia flash flash remoting:
Hi Gang. I've had this happen before and for the life of me I can't remember
why. In my .as file I have a call to the database which then returns a result
set. The CFC is returning a query result which I can see in the NetDebug
window just fine...so I know the call to the db is working. However my
responder setup for result/fault won't call either of them. Here's the
code....any help much appreciated.


setPerms.change = function(evt:Object) {
_root.administrator.permissionName_txt.text =
_root.administrator.clientPerms_cb.selectedItem.label;
NetDebug.trace("Loading the Permission Objects...");
var securityService = new Service(null, null, _global.security_service,
_global.spotCon, null);
var PC:PendingCall = securityService.getPermObjects({adminLevel:
"restricted");
PC.responder = new RelayResponder(this, "djData", "djFault");
}

function djData(re:ResultEvent){
NetDebug.trace("Adding Items to DataGrid");

}

function djFault(fault:FaultEvent){
NetDebug.trace("Problem with data load");
}
Re: RelayResponder wont' call the result function ufitzi
12/1/2005 5:26:00 PM
My problem seems to be specific to Flash Player 8, I've tested in both IE and
Firefox.
not sure if my problem is related, but here goes.
Using browsers that have FP8, I have a main movie (just a MovieClipLoader that
tracks the %) load an external SWF.
The external SWF contains a remoting call, used to initialize a ComboBox.
Because the SWF is already deployed, and because this problem is only
occurring in FP8, I'm unable to determine where the remoting call is
"breaking," but the result method is never invoked.
BUT, if I isolate the external SWF and just run it in an html page, the
remoting procedure works.
Both SWF's are exported as 7, and the remoting call is to a CFC within the
same domain.
Check it out.
THE BROKEN VERSION, WITH LOADER: http://lakeplacid.com/flash/f/map/map.cfm
THE ISOLATED SWF: http://lakeplacid.com/flash/f/map/test.htm


Re: RelayResponder wont' call the result function rfinn NO[at]SPAM rice
12/13/2005 9:49:02 PM
I have the exact same problem just developing in Flash 8, not even deployed in
a browser. The debug and log show that the server is returning information (it
even changes according to the passed arguments from Flash), but the result and
fault functions simply are not being called at all.
Re: RelayResponder wont' call the result function ufitzi
12/15/2005 5:58:35 PM
More ingredients....(maybe we need to post this to the AS forum, no one from MM
seems to be monitoring this forum).
-------------
I'm developing a remoting app that uses setInterval() to invoke my remoting
call every X minutes.
First time through, everything is golden.
Data is returned, etc, etc.
setInterval then makes call #2, which, according to the NetDebug window,
executes successfully, however my result handler is never called.




Re: RelayResponder wont' call the result function boxdoctor
12/15/2005 6:18:13 PM
Yea maybe. It doesn't seem to make any sense to me. the only thing I can
possibly think of is that there's some remoting issue that prevents the result
handler from being called. The way I've worked around it (which is annoying)
is I call the class from the actions panel in the clip....do everything I can
do in the class, then pass back a function call to the clip, which then turns
around and recalls the class.

Really not the best way to do things but I can't seem to figure out why I
can't call a class and have the class do some calcs....call a remoting to the
db......get the results.....do something with them....then make another
function call.....do some more calcs....do another db call....etc. Just seems
silly that so many of us are having this same type of issue.
Re: RelayResponder wont' call the result function ufitzi
12/15/2005 6:48:47 PM
SUCCESS!!!!
Previously, I had code in a function that created my Service, PendingCall, and
RelayResponder objects, like so:
--------------
function checkConditions():Void
{
var s:Service = new
Service("http://adworkshop2.media3.net/flashservices/gateway",null,"remoting.gor
e.trail",null,RR_getConditions);
var pc:PendingCall = s.getConditions();
pc.responder = new RelayResponder(this,"onSuccess","onFault");
}
----------------
This would work first time through, then fail to call onSuccess() with each
subsequent call.
The change I made was to create my RelayResponder object on the main timeline,
outside of the function.
------
var myRR:RelayResponder = new RelayResponder(this,"onSuccess","onFault");
------
Then, when I create my Service object, I pass myRR as the final argument.
----
var s:Service = new Service(remotingCon,null,"trail",null,RR_myRR);
------
Now onSuccess is called as expected.
Wish I could explain why my first attempt wasn't working, but at least this
solved it.
So, if you have a class that includes all your remoting code, try placing the
Remoting objects in your main timeline and calling them from your class.
Programatically speaking, we shouldn't have to do this, but come on, it's
FLASH!!
How many times have you stumbled upon a strange solution like this?
Hopefully Adobe will tighten there Software Development squad up a bit.


AddThis Social Bookmark Button