views:

93

answers:

0
[sessionController.currentSession addObserver:self
                            forKeyPath:@"sessionState"
                               options:(NSKeyValueChangeSetting)
                               context:NULL];

This doesn't seem to be working.

The class where this code goes knows about the sessionController and has access to the currentSession. The sessionState variable of the currentSession is what I want to observe. Is it verboten to set the object to be observed in the way I've done it here?

If so, what is the way to do it? Short of giving the observing object a currentSession variable.