I'm just curious about how people are handling the fact that when
you do
KVO, all your notifications are bottlenecked through a single method,
observeValueForKeyPath:... This is a very unpleasant and crude
architecture
(in contrast to NSNotification where, when a notification comes in,
it is
automatically routed to the selector of your choice). I really
don't want a
series of "ifs" here. I can imagine a simple dispatcher
architecture based
on NSSelectorFromString; is this the sort of thing people are
using? Thx -
m.
Just be really careful to always use a context that is a selector,
otherwise you will probably crash. [NSObject respondsToSelector:]
will probably work for a pointer that is not a selector, but I
wouldn't count on it.
You can of course pass the object or keyPath as well if you need it.
Unfortunately there is no [NSObject
performSelector:withObject:withObject:withObject:] if you need all
three arguments.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden