Hi Alex,
Thanks for the reply.  I'm trying to figure out which of these two 
(or maybe both) apply in my case.

I have my singleton manager, whose implementation is defined as:
public class SASManagerImpl extends EventDispatcher implements 
ISASManager

I have a remote object with a listener defined for the 
FaultEvent.Fault.  That listener function is:
private function handleFault(event:FaultEvent):void{
var smf:SASManagerFaultEvent = new  SASManagerFaultEvent
(faultStr,event.bubbles,event.cancelable,event.fault,event.token,event
.message);
                                                                
event.stopPropagation();
this.dispatchEvent(smf);
}

SASManagerFaultEvent extends FaultEvent and defines a few new 
constants (around the different remote calls I make).

Can you tell what I am doing wrong from this?

Also, if there is a good tutorial somewhere on this, please send it 
along.  I have looked, but cannot find anything.

Thanks
Dominic

--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Usually, this is an error in the metadata that describes which event
> class will be dispatched for a particular event, or an error in the 
code
> where the type of event in the parameter list of the listener 
function
> does not match the actual event sent.
> 
>  
> 
> ________________________________
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Dominic Pazula
> Sent: Wednesday, March 26, 2008 2:23 PM
> To: [email protected]
> Subject: [flexcoders] Events and .dispatchEvent();
> 
>  
> 
> This is probably a real easy one.
> 
> I have a manager for my RPC processes that extends 
EventDispatcher.  I
> have 2 custom events (fault and result) that extend the RPC 
ResultEvent
> and FaultEvent.  I have listeners in the manager that catch the rpc
> events, use them to create my events, stopPropagation() on the RPC
> event, and then use this.dispatchEvent(myevent) to send my event 
along.
> 
> Sometimes this works.  Sometimes it doesn't.  I often get errors 
like
> the following:
> 
> TypeError: Error #1034: Type Coercion failed: cannot convert
> talonlib.events::[EMAIL PROTECTED] to 
mx.rpc.events.MyFaultEvent.
> 
> I'm sure I'm missing something somewhere?  Can anyone see this off 
the
> top of their head, or know of a good resource to look into to learn 
more
> about this topic?
> 
> Thanks
> 
> Dominic
>


Reply via email to