Copyright 2004 by M. Uli Kusterer Tue, 30 Dec 1969 07:58:58 GMT Comments on article blog-safe-key-value-coding at Zathras.de http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm blog-safe-key-value-coding Comments witness_dot_of_dot_teachtext_at_gmx_dot_net (M. Uli Kusterer) witness_dot_of_dot_teachtext_at_gmx_dot_net (M. Uli Kusterer) en-us Comment 6 by Uli Kusterer http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment6 http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment6 Uli Kusterer writes:
Ben, have you filed a bug about this with Apple? I have. Add your voice to the list of people asking for it, it'll increase the likelihood of actually getting it. Besides, it's probably a nice project for an Apple intern.
Comment 5 by Ben Cohen http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment5 http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment5 Ben Cohen writes:
This is useful. Thanks.

I wish there was a way to use constants in Interface Builder. I've lost count of the number of times I've had KVO related errors due to miss typing key paths in IB.
Comment 4 by Uli Kusterer http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment4 http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment4 Uli Kusterer writes:
Mike, yes, properties with customized getter names are one downside. Also, this won't work for key paths, only for single keys. One could probably create macros that generate a key path, but that would use commas and would have to be a macro like KEYPATH3(foo,bar,baz) instead of just @property(foo.bar.baz).
Comment 3 by Uli Kusterer http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment3 http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment3 Uli Kusterer writes:
Have you tried just checking the "undeclared selectors" checkbox? That will only apply the setting to .m and .mm files, and not to .c files. If you add it to the OTHER_CFLAGS, of course it'll end up in C as well.

I do wonder whether there's an OTHER_OBJCFLAGS, though...
Comment 2 by DavidPhillipOster http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment2 http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment2 I couldn't get -Wundeclared-selector to work in a program that also had a few .c files.

I filed a bug about it ( http://openradar.appspot.com/7289608 ) . Do you have any suggestions?
Comment 1 by Mike Abdullah http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment1 http://www.zathras.de/angelweb/blog-safe-key-value-coding.htm#comment1 Mike Abdullah writes:
I suppose there is one downside: If you've got a scenario like this:

- (BOOL)isEditable;
- (void)setEditable:(BOOL)flag;

The key is "editable" but there's no @selector(editable) already in existence.