> On 22 Sep 2016, at 03:36, Graham Cox <graham....@bigpond.com> wrote: > > >> On 22 Sep 2016, at 10:40 AM, Quincey Morris >> <quinceymor...@rivergatesoftware.com> wrote: >> >> On Sep 21, 2016, at 17:01 , Graham Cox <graham....@bigpond.com> wrote: >>> >>> This should be: if([(NSString*)context >>> isEqualToString:@“mediaLibraryLoaded”])… >> >> Actually, this is not a good idea either, because *other* observations — >> ones you don’t control — might use a value that’s not an object, or not even >> a valid pointer. > > > Fair point. > > Which is yet another reason why void* is such a shitty concept. Apple could > easily have insisted that parameter was id<NSObject> without any real > problems, so void*… sheesh. > > So Gabriel’s alternative is basically to use a global address, as you > otherwise suggested. > > void* tsk… *goes away muttering*
No. It is not supposed to be a refCon or userInfo. It's a unique identifier for this observation (which can't be "self", because then observations registered by a subclass would get the same identifier as observations registered by the base class, and if one unsubscribes or re-subscribes earlier than the other, one could remove the other's observation and would break things. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com