Skip to content
This repository has been archived by the owner on Aug 6, 2018. It is now read-only.

Session#process_events_on should be able to listen for events on other objects #25

Closed
Burgestrand opened this issue Jun 4, 2011 · 2 comments
Assignees

Comments

@Burgestrand
Copy link
Owner

Possible solutions:

  1. Pass a Hash<Object,Event> (would allow one to listen for events on multiple objects):

    session.process_events_on(playlist_container => [:container_loaded], playlist => [:playlist_state_changed])

    Would be useful waiting for multiple tracks to load, for example (?). But… YAGNI?

  2. Allow passing the object to listen to as the first parameter:

    session.process_events_on(playlist, :playlist_state_changed, :playlist_metadata_updated)

    This would only allow you to listen for events on a single object, and this is the simplest thing
    that could possibly work. I think I will go with this implementation first, and later refactor if needed.

Number 2 has the benefit of making it easier to implement #24, as well.

@ghost ghost assigned Burgestrand Sep 22, 2011
@Burgestrand
Copy link
Owner Author

Might be related to #56.

@Burgestrand
Copy link
Owner Author

Screw it. This issue’s been around for ages and appears to not have been needed. Most of the loading is done with polling (there’s a place to fix the API). At best case, #26 is pretty much the solution to this one as well.

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

No branches or pull requests

1 participant