Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeMappedSignal mapTo Function with return Class #64

Open
webysther opened this issue May 13, 2013 · 2 comments
Open

NativeMappedSignal mapTo Function with return Class #64

webysther opened this issue May 13, 2013 · 2 comments

Comments

@webysther
Copy link

This don't work:

public function request( command:String , data : Object = null ):void
{
    signalMapper = new NativeMappedSignal( 
        this._service, 
        HttpResponseEvent.COMPLETE, 
        HttpResponseEvent,
        ResourceModel,
        Object
    ).mapTo( onResponseMap, data );
}

public function onResponseMap( event:HttpResponseEvent ):ResourceModel
{
    return new ResourceModel();
}

In Tests(tests/org/osflash/signals/natives/NativeMappedSignalFunctionArgTest.as) use just String, int, Number and Array, just this types is supported?

Error returned:

ArgumentError: Value object <function Function() {}> is not an instance of <[class ResourceModel]>.
    at org.osflash.signals::DeluxeSignal/dispatch()[D:\_github\as3-signals-0.8\src\org\osflash\signals\DeluxeSignal.as:148]

I'm using:

signals 0.8
robotlegs 1.5.2
signals-extension 0.2.4

Thanks for all, i'm working in this... 👍

@webysther
Copy link
Author

Is possible now with this map multiple types in any order... \o/

@webysther
Copy link
Author

Ignore patch 1, just consider the 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant