You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 6, 2018. It is now read-only.
Turns out Playlists, Playlist Containers and… Searches not only allow you to retrieve a specific object by its’ index, but also some status information on it and even allow you to modify fields.
Say, for Playlists, we have sp_track *sp_playlist_track_message (sp_playlist *playlist, int index). Thing is, we also have:
It is clear that Hallon need to support these (or similar) API calls:
playlist.track[0].name# called on trackplaylist.track[0].artist# called on trackplaylist.track[0].creator# called through playlist_track_creatorplaylist.track[0].seen=true# called through playlistplaylist.track[0].message# called through playlist
I am thinking some kind of proxy object where you explicitly define your extra methods, and any other methods fall through to the underlying object at that position. Oh well, that’s for another day.
The text was updated successfully, but these errors were encountered:
Another option is to subclass Track, (making a PlaylistTrack or whatever) that holds a back-reference to the playlist somehow, and as such allow look-ups on these additional methods; like creator, seen= and so on. It’d have the drawback of requiring you to keep a reference to the Playlist, however.
Turns out Playlists, Playlist Containers and… Searches not only allow you to retrieve a specific object by its’ index, but also some status information on it and even allow you to modify fields.
Say, for Playlists, we have
sp_track *sp_playlist_track_message (sp_playlist *playlist, int index)
. Thing is, we also have:It is clear that Hallon need to support these (or similar) API calls:
I am thinking some kind of proxy object where you explicitly define your extra methods, and any other methods fall through to the underlying object at that position. Oh well, that’s for another day.
The text was updated successfully, but these errors were encountered: