Skip navigation.
 
mlNSArrayController Key-Value Observing
FROM : Paul De Vera
DATE : Fri Jan 11 03:33:22 2008

I am trying to track the selections of an NSArrayController.  I set up 
an observer for the selectedObjects property of the NSArrayController 
but when I get to observeValueForKeyPath and print the description of 
the (NSDictionary *)change argument, I get null for the old value. I 
was expecting to get an NSArray.  Why am I not getting the proper value?

GDB output:
Printing description of change:
<CFDictionary 0x1497c0 [0xa07311a0]>{type = mutable, count = 2, 
capacity = 3, pairs = (
   0 : <CFString 0xa01c6658 [0xa07311a0]>{contents = "kind"} = <CFNumber 
0x10e8e0 [0xa07311a0]>{value = +1, type = kCFNumberSInt32Type}
   2 : <CFString 0xa01c6638 [0xa07311a0]>{contents = "old"} = <CFNull 
0xa0731020 [0xa07311a0]>
)}

Thanks in advance,
Paul

Related mailsAuthorDate
mlNSArrayController Key-Value Observing Paul De Vera Jan 11, 03:33
mlRe: NSArrayController Key-Value Observing mmalc crawford Jan 11, 05:13