Thanks for this post. I thought I had updated to SDK 3.3, but it looks like my 
default was still 3.1. I updated Flex Builder to use the 3.3 SDK and I'll give 
it all a second try.

I'll also take a look at Amy's URL, to make sure I'm doing things in a kosher 
manner.

Tref

--- In [email protected], "peeyushtuli" <peeyus...@...> wrote:
>
> Asynctokens do work. I havent seen a single case of the handlers not being 
> invoked being linked to some bug in flex sdk. Can you please post some code 
> snippets of how exactly you used the asynctoken and mention the flex sdk?
> 
> 
> --- In [email protected], "trefalgar" <trefalgar@> wrote:
> >
> > I've given up for now. 
> > 
> > AsyncTokens appear to be the way to go, but by the documentation I've seen 
> > it *should* work, but the result/fault handlers are never hit. I decided to 
> > try using 'closure' instead - I'm not even sure if the variables will 
> > remain stateful, but it's at least in a forward direction for now.
> > 
> > I think this is another case of the documentation being abysmally lacking.
> > 
> > Tref
> > 
> > --- In [email protected], "trefalgar" <trefalgar@> wrote:
> > >
> > > Yeap, looking at that now and having little luck as well.
> > > 
> > > http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_23313753.html,
> > >  for example, shows someone with a similar problem with a similar 
> > > solution. Here's what I've got ...
> > > 
> > > var myService:Statistics = new Statistics(null,endPoint);
> > > var token:AsyncToken = 
> > > myService.disableStatistics(user,pass,email,tArray);
> > > token.email = email;
> > > token.addResponder(new AsyncResponder(myResults,myFaults,token)); 
> > > 
> > > myResults and myFaults are never hit. If I use addEventListener against 
> > > myService instead, I get the resulting data, but nothing from the 
> > > token:AsyncToken. 
> > > 
> > > I'm not comfortable that I have the AsyncToken set up properly, since it 
> > > doesnt make sense to make the call to myService before 'email' or 
> > > 'addResponder' is issued, which is what I'm playing with right now.
> > > 
> > > Treffy
> > > 
> > > 
> > > --- In [email protected], João Fernandes 
> > > <joaopedromartinsfernandes@> wrote:
> > > >
> > > > You can add a responder to your AsyncToken which will carry your fault 
> > > > and
> > > > result handlers.
> > > > 
> > > > 2010/1/18 trefalgar <trefalgar@>
> > > > 
> > > > >
> > > > >
> > > > > For those wanting to follow this suggestion, there's a good example 
> > > > > here:
> > > > > http://livedocs.adobe.com/flex/3/html/help.html?content=data_4.html. 
> > > > > It's
> > > > > towards the bottom, "Using a return token".
> > > > >
> > > > > Unfortunately, this example doesn't appear to work for me. It uses the
> > > > > Flex-built SOAP code and an AsyncToken to keep track of things. I 
> > > > > don't have
> > > > > a FaultEvent.FAULT or ResultEvent.RESULT option when adding an event
> > > > > listener to my AsyncToken.
> > > > >
> > > > > Back to the drawing board I go.
> > > > >
> > > > > Jacob
> > > > >
> > > > >
> > > > > --- In [email protected] <flexcoders%40yahoogroups.com>, João
> > > > > Fernandes <joaopedromartinsfernandes@> wrote:
> > > > > >
> > > > > > > That said, since #2 doesn't tell me what user it's replying "no" 
> > > > > > > to,
> > > > > > > if I do this in a loop with 100 users, it could be replying back 
> > > > > > > with
> > > > > > > 20 "no"s and I can't tell how I'd match the replies up with the
> > > > > requests.
> > > > > > Yes you can, try using the asyncToken generated by
> > > > > > service.invokeWs(user) and store your user in some property (eg.
> > > > > > currentUser) , once you get the resultEvent, that AsyncToken will 
> > > > > > have
> > > > > > the corresponding user stored (event.token.currentUser).
> > > > > >
> > > > > > --
> > > > > >
> > > > > > João Fernandes
> > > > > >
> > > > > > Adobe Certified Expert
> > > > > > Adobe Community Expert
> > > > > > http://www.twitter.com/joaofernandes
> > > > > > http://www.riapt.org
> > > > > > Portugal Adobe User Group (http://aug.riapt.org)
> > > > > >
> > > > >
> > > > >  
> > > > >
> > > > 
> > > > 
> > > > 
> > > > -- 
> > > > 
> > > > João Fernandes
> > > >
> > >
> >
>


Reply via email to