Custom NSDictionaryController object class
Custom NSDictionaryController object class
- Subject: Custom NSDictionaryController object class
- From: Simone Manganelli <email@hidden>
- Date: Sun, 28 Dec 2008 14:29:45 -0800
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 (email@hidden)
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:
This email sent to email@hidden