I'm having a problem with NSDictionaryController. I created a class named EPCustomClass that I want to use as the object class that NSDictionaryController uses when returning objects from methods such as -newObject or -arrangedObjects. So on wake from nib, I've sent - setObjectClass:[EPCustomClass class] to my NSDictionaryController (that's instantiated in a nib) to tell it to use the new objects.

But my custom methods don't seem to be used. These objects conform to the NSDictionaryControllerKeyValuePair protocol, but if I put an NSLog line inside my -setValue: method, the log line doesn't get printed at all even when I call -setValue: on one of these objects. Furthermore, objects returned by my NSDictionaryControllers methods don't seem to respond to custom methods that I've implemented in EPCustomClass; it just says that an unrecognized selector was sent to that object.

What's going on here? When I call -objectClass on my NSDictionaryController, it's correctly returning EPCustomClass, but it doesn't seem to be using any of the modifications I've used to the class!? This can't possibly be normal behavior. What am I doing wrong?

-- Simone
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to