Re: Observing changes in TableView


Gerriet M. Denkmann
 

On 9 Nov 2017, at 01:36, Quincey Morris <quinceymorris@...> wrote:

On Nov 8, 2017, at 01:47 , Gerriet M. Denkmann <g@...> wrote:

So I gave the Button a target and action, but this never results in a message sent.
This ought to work, so I think you should focus on finding out why it isn’t. What are you specifying for the target? It should be something that doesn’t depend on the cell itself, like the view controller or the app delegate.
It was the app delegate.

I found another solution:
The contentArray contains only a few dictionaries - less than a dozen.
So I decided to observe all of them:

for( NSDictionary *d in self.contentArray )
{
[ d addObserver: self
forKeyPath: kKeyPath // “Flag”
options: 0
context: (__bridge void * _Nullable)(kKeyPath)
];
};

Kind regards,

Gerriet.

Join cocoa@apple-dev.groups.io to automatically receive all group messages.