• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Custom NSDictionaryController object class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Custom NSDictionaryController object class
      • From: Ron Lue-Sang <email@hidden>
  • Prev by Date: Re: CATextLayer not visible when added as a sub-layer . . .
  • Next by Date: Re: Custom NSDictionaryController object class
  • Previous by thread: Re: should it crash?
  • Next by thread: Re: Custom NSDictionaryController object class
  • Index(es):
    • Date
    • Thread