Skip to content

Can't re-dispatch events #1

@mattupstate

Description

@mattupstate

Currently its impossible to re-dispatch events. For example...

private function statusHandler( event:HttpStatusEvent ):void
{
    dispatchEvent( event );
}

It will throw this error:

TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@16be0a1 to org.httpclient.events.HttpStatusEvent.

To fix, override the clone() method in your event classes. For example:

override public function clone():Event 
{
    return new HttpStatusEvent( response, type, bubbles, cancelable );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions