I am just learning KVO. This is my first time implementing it and I am getting rather confused trying to keep it all straight.
Right now I have a popupbutton that is connected to an arraycontroller whose content is supplied by a dictionary.
I have a second popupbutton with a filterpredicate set to the value of the first popupbutton's selection.
I need to add KVO to observe for changes in the first popupbutton's selection, and change the filterpredicate accordingly.
so far I have this..
[nameController setContent:itemDictionaries];
self.predicate = [NSPredicate predicateWithFormat:@"item == %@", [[nameController selection] valueForKeyPath:@"item"]];
[itemListController setFilterPredicate:self.predicate];
How can I add KVO to the popbutton's selection and subsequently update the value of the predicate?