-
Notifications
You must be signed in to change notification settings - Fork 82
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
Flipbook.play() should return a Future<Event> #244
Comments
Thanks for the proposal. Getting a future from the play method looks natural.
The "onComplete" getter returns the Event.Complete stream. But still, your proposal is the easiest way to write this code. And it's not a breaking change! |
Yep, I was actually already doing this in my code. If we return that future it would make it even more readable. |
I did some changes to the FlipBook class, please take a look at the new method playWith: Would be great if you could give it a try! |
lgtm. Only gripe you may get is that some people may expect juggler to be named parameter there as well, i.e. ani.playWith(juggler: stage.juggler); Personally, I think it's fine the way you have it, and a nice convenience function. |
I'm still thinking about the named parameters. This is not only a thing of the Flipbook class but also all over the StageXL code. Have to think about the best way to fix or solve this. |
current
play()
returns void. I think it'd be helpful to return aFuture<Event>
here. It would return_completeEvent
.Then, you could do something like:
as opposed to:
The text was updated successfully, but these errors were encountered: