spotify/cocoalibspotify — Issue #45: SPSearch and SPArtistBrowse confusion
Author: alexwinston
Created: 2012-02-10 22:02:33+00:00
State: open

Sorry if I am not seeing something obvious or am just dense but I don't really understand how these classes are to be used in any reasonable manner. Unfortunately I was not able to find any examples so if there are any that would be very helpful.

SPSearch offers autoreleased search objects but when you try to observe them obviously they are released at some point so this isn't an option. Otherwise I have to retain and release after an alloc/initSearchWith in order to observe searchInProgress and this seems an odd way to do this.

The same applies to SPArtistBrowse. If I want to observe the loaded KVO then I have to retain the object which means the artistBrowse autorelease methods are mostly useless.

I am no ObjC expert so maybe I am missing something obvious. If not it seems like a simple callback would be a better approach.