JesterXL,

Yeah, that's kinda what I suspected. I suppose I could stick it in a
ModelLocator.  However all my events are asynchronous, so I suppose
that *theoretically* your data in ModelLocator might not be in the
*correct* context if, say, you have some chained asychronous events right?


thanks,
George


--- In flexcoders@yahoogroups.com, "JesterXL" <[EMAIL PROTECTED]> wrote:
>
> Oh... well that's different.  The reason you're not getting it is
because 
> the event you dispatch is handling internally in Cairngorm, and
triggers the 
> Command.  After that, it's done, gone, and no longer can be access.
 The 
> Responder.onResult event is the event returned from a successful
webservice 
> call, and is a totallly different event object.
> 
> You could instead stick the data temporarely on the ModelLocator so
whoever 
> is utilizing the Responder's result event can look there for context.
> 
> ----- Original Message ----- 
> From: "george_lui" <[EMAIL PROTECTED]>
> To: <flexcoders@yahoogroups.com>
> Sent: Monday, January 09, 2006 4:00 PM
> Subject: [flexcoders] Re: Need help in tackling this event problem...
> 
> 
> Actually that is the problem.  The event I dispatch *doesn't* appear
> to be the same event I get back in my result handler.
> 
> We use our custom event broadcaster to pass an event, pass it some
> event data, and pass the Responder object (ViewHelper) in our case.
> The command has access to the event data and does it's execute() thing
> (it makes a service call).  However in our Responder.onResult(event)
> and Responder.onFault(event), the event doesn't appear to be the same
> event I passed in.  For instance, event.data and event.type yields
> "undefined".
> 
> According to the Cairngorm documentation the returned event after a
> service call :
> "event - An object containing the data passed back from the service
> call..."
> 
> Kinda leads me to believe that the event object avail in onResult()
> and onFault() is not the same as the one that was broadcasted prior to
> any backend service call.
> 
> Maybe this is Cairgorm that's not working as I want it to?  Any
> Cairgorm guru's out there?
> 
> TIA,
> george
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "JesterXL" <[EMAIL PROTECTED]> wrote:
> >
> > Sure, I reckon.  I've never used Cairngorm, but if memory serves
> when I was
> > reading the files, yeah.  If you dispatch the event, he should have
> all of
> > the properties that you set on the event carred over since the event
> you
> > dispatch is the one you'll get in your result handler.
> >
> > ----- Original Message ----- 
> > From: "george_lui" <[EMAIL PROTECTED]>
> > To: <flexcoders@yahoogroups.com>
> > Sent: Monday, January 09, 2006 2:21 PM
> > Subject: [flexcoders] Re: Need help in tackling this event problem...
> >
> >
> > Event is a class in Cairngorm.  I'm assuming that you meant that I
> > should subclass the Event class right?
> >
> > TIA,
> > george
> >
> >
> > --- In flexcoders@yahoogroups.com, "JesterXL" <[EMAIL PROTECTED]> wrote:
> > >
> > > Impossible to do with anonymous objects.  However, if you make your
> > event a
> > > class, you have no problems.  This is enforced at runtime in AS3:
> > >
> > > class Event
> > > {
> > >     private var test:String;
> > >
> > >     public var target:Object;
> > >     public var type:String;
> > > }
> > >
> > > var e:Event = new Event();
> > > e.target = this;
> > > e.type = "test";
> > > dispatchEvent(e);
> > >
> > > function onResult(event:Event):Void
> > > {
> > >     trace(event.test); // won't compile
> > > }
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Weyert de Boer" <[EMAIL PROTECTED]>
> > > To: <flexcoders@yahoogroups.com>
> > > Sent: Saturday, January 07, 2006 8:38 AM
> > > Subject: Re: [flexcoders] Need help in tackling this event
problem...
> > >
> > >
> > > JesterXL wrote:
> > >
> > > >Clearly your problem is your custom EventDispatcher.  The one that
> > comes
> > > >with Flex allows me to throw any custom arg I want at result
> handlers.
> > > >Find
> > > >out why he's not keeping your event handlers.
> > > >
> > > >
> > > Yes, EventDispatcher something I have issues with to understand. It
> > > keeps sending data I don't want to the listeners such as private
> > > variables of the class <g>
> > >
> > >
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > Yahoo! Groups Links
> > >
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> 
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to