Re: Custom NSDictionaryController object class
Re: Custom NSDictionaryController object class
- Subject: Re: Custom NSDictionaryController object class
- From: Ron Lue-Sang <email@hidden>
- Date: Sun, 28 Dec 2008 15:35:16 -0800
The dictionary controller doesn't support customizing object class.
Please file an enhancement request, including info on what behaviour
you're trying to add.
The dictionary controller is really designed for a specific use case -
showing dictionary entries in a tavleview.
---------------------
RONZILLA
On Dec 28, 2008, at 2:29 PM, Simone Manganelli <email@hidden> wrote:
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
_______________________________________________
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