On Aug 11, 2011, at 9:11 PM, Jens Alfke wrote:
> On Aug 11, 2011, at 8:59 PM, Jim Correia wrote:
>> For KVO contexts, you don't care about the value, but you do care that it is
>> unique.
>
> I generally use a selector for this purpose. It doesn’t require a separate
> definition, and it’s also e
On Thu, Aug 11, 2011 at 9:26 PM, William Squires wrote:
> ...
> I believe you have two erroneous '*'s in there! '*context:' doesn't make
> sense as part of a method signature in ObjC, and there shouldn't be an
> asterisk after 'context' but before the opening '{' (an '*' comes before an
> identif
On Thu, Aug 11, 2011 at 9:11 PM, Jens Alfke wrote:
>
> On Aug 11, 2011, at 8:59 PM, Jim Correia wrote:
>
>> For KVO contexts, you don't care about the value, but you do care that it is
>> unique.
>
> I generally use a selector for this purpose. It doesn’t require a separate
> definition, and it’
On Aug 11, 2011, at 8:59 PM, Jim Correia wrote:
> For KVO contexts, you don't care about the value, but you do care that it is
> unique.
I generally use a selector for this purpose. It doesn’t require a separate
definition, and it’s also easy to use it to tell the observer to delegate to
the
On Aug 11, 2011, at 7:27 PM, William Squires wrote:
> On Aug 11, 2011, at 6:51 PM, Kyle Sluder wrote:
>
>> On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke wrote:
>>>
>>> On Aug 11, 2011, at 4:10 PM, Luther Baker wrote:
>>>
static void *AVPlayerDemoPlaybackViewControllerRateObservationContext
On Aug 11, 2011, at 9:27 PM, William Squires wrote:
> On Aug 11, 2011, at 6:51 PM, Kyle Sluder wrote:
>
>> On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke wrote:
>>>
>>> On Aug 11, 2011, at 4:10 PM, Luther Baker wrote:
>>>
static void *AVPlayerDemoPlaybackViewControllerRateObservationContext
Oops, my typo: of course I meant to type
'AVPlayerDemoPlaybackViewControllerRateObservationContext'... a 'N' got in
there somehow! :)
On Aug 11, 2011, at 9:18 PM, William Squires wrote:
> It's a (pointer) variable whose contents is its own memory address (the '&'
> operator.) Because the decl
On Aug 11, 2011, at 6:51 PM, Kyle Sluder wrote:
> On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke wrote:
>>
>> On Aug 11, 2011, at 4:10 PM, Luther Baker wrote:
>>
>>> static void *AVPlayerDemoPlaybackViewControllerRateObservationContext = &
>>> AVPlayerDemoPlaybackViewControllerRateObservationCont
On Aug 11, 2011, at 6:36 PM, Luther Baker wrote:
> I see.
>
> In this case, it is passed in as the context of a KVO registration ... and
> as such, it facilitates a direct equality test in the KVO handler.
>
> - (void)observeValueForKeyPath:(NSString*)path ofObject:(id)object change:(
> NSDicti
It's a (pointer) variable whose contents is its own memory address (the '&'
operator.) Because the declaration includes 'static', the compiler simply pulls
the info from the symbol tree so it already knows what a
'ANPlayerDemoPlaybackViewControllerRateObservationContext' is (it's a 'void
*'),
On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke wrote:
>
> On Aug 11, 2011, at 4:10 PM, Luther Baker wrote:
>
>> static void *AVPlayerDemoPlaybackViewControllerRateObservationContext = &
>> AVPlayerDemoPlaybackViewControllerRateObservationContext;
>
> It’s initializing the variable to point to itself.
I see.
In this case, it is passed in as the context of a KVO registration ... and
as such, it facilitates a direct equality test in the KVO handler.
- (void)observeValueForKeyPath:(NSString*)path ofObject:(id)object change:(
NSDictionary*)change *context:(void*)context* {
if (context == AVPla
On Aug 11, 2011, at 4:10 PM, Luther Baker wrote:
> static void *AVPlayerDemoPlaybackViewControllerRateObservationContext = &
> AVPlayerDemoPlaybackViewControllerRateObservationContext;
It’s initializing the variable to point to itself. Which seems sort of
pointless, but I don’t know the context
What is this statement actually doing?
static void *AVPlayerDemoPlaybackViewControllerRateObservationContext = &
AVPlayerDemoPlaybackViewControllerRateObservationContext;
Isn't the right side evaluated first? But it doesn't yet exist? It compiles
... but seems to be a recursive definition??
http
14 matches
Mail list logo