• 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
Re: NSDictionaryController and inserting new objects.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionaryController and inserting new objects.


  • Subject: Re: NSDictionaryController and inserting new objects.
  • From: Guy Umbright <email@hidden>
  • Date: Tue, 8 Apr 2008 22:42:54 -0500

But that still leaves the question unresolved. How do you add an object into a dictionary via NSDictionaryController?

I have a NSCollectionView bound to a NSArrayController and am able to add things to its content array via addObject. Works great, the object immediately shows up in the collection view.

As NSDictionaryController provides arrangedObject also, I thought that it would be good to switch as having access to my object by key would be a great time saver, but for the life of me I cannot fathom how to add a key/value to the underlying dictionary via NSDictionaryController.

Anyone know how to do it?

Guy Umbright

On Apr 1, 2008, at 1:16 AM, Kyle Sluder wrote:

On Tue, Apr 1, 2008 at 1:17 AM, Jiva DeVoe <email@hidden> wrote:
Or do the NS*Controller classes provide some other cool
features that would be difficult for my mere mortal development skills
to implement?

Well as far as your current use case is concerned, the only things you need to override are things that Cocoa could not possibly do for itself (unless NSController were to accept a delegate). but even then, NSController does it all for you in Core Data entity mode, which is something that Ben Trumbull could do but most likely not you or I.

--Kyle Sluder
_______________________________________________

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


  • Prev by Date: Programmatic binding not working both ways?
  • Next by Date: Re: How to store NSRect as Core Data attribute?
  • Previous by thread: Re: Programmatic binding not working both ways?
  • Next by thread: Beginner TableView Questions
  • Index(es):
    • Date
    • Thread