• 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: NSArrayController using an external NSArray?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController using an external NSArray?


  • Subject: Re: NSArrayController using an external NSArray?
  • From: Todd Heberlein <email@hidden>
  • Date: Thu, 19 Apr 2007 20:02:54 -0700


On Apr 19, 2007, at 5:25 PM, Ron Aldrich wrote:

[[self mutableArrayValueForKey: @"myArray"] addObject: anObject];

Unfortunately, this did not work either. My array was updated correctly, but the information was still not showing up the in the NSTableView which is bound to the NSControllerArray. The documentation all points this way, so I must still be doing something wrong.


As a work around, I added to my model a pointer to the NSArrayController and sent it the addObject: method. In other words, I went from:

	[myArray addObject: anObject];
to
	[myArrayController addObject: anObject];

It seems really kludgy (my model shouldn't know about the controller, IMHO), but it did correctly update both the NSTableView and my NSMutableArray.


Oh well...

Todd

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: NSArrayController using an external NSArray?
      • From: Todd Heberlein <email@hidden>
References: 
 >NSArrayController using an external NSArray? (From: Todd Heberlein <email@hidden>)
 >Re: NSArrayController using an external NSArray? (From: Todd Heberlein <email@hidden>)
 >Re: NSArrayController using an external NSArray? (From: Ron Aldrich <email@hidden>)

  • Prev by Date: Re: Framework versioning in OS X
  • Next by Date: Re: NSArrayController using an external NSArray?
  • Previous by thread: Re: NSArrayController using an external NSArray?
  • Next by thread: Re: NSArrayController using an external NSArray?
  • Index(es):
    • Date
    • Thread