• 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: Help with NSArrayController, NSTableView and NSOpenPanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with NSArrayController, NSTableView and NSOpenPanel


  • Subject: Re: Help with NSArrayController, NSTableView and NSOpenPanel
  • From: George Orthwein <email@hidden>
  • Date: Thu, 22 Jun 2006 22:31:51 -0400

I think your dirContents array may be redundant. When you assign that to the NSArrayController then every element of the array controller will itself be a dirContents mutable array. The NSArrayController creates its own array of whatever class you assign to it.

That's why when you assigned the array of names to the NSArrayController they all showed up in the first table row... each row of the table will be an entire array.

What you really want is an NSArrayController managing the model class directly. Then you can bind to the dirName key. You won't need to use the contentArray binding either.

You didn't exactly say what the NSObjectController was for, but it can probably be removed as well.

(Ok, I just double checked because I've been living in the Core Data world lately. What I said is true if you use Automatically Prepares Content on the controller — it will create its own array. You probably have that off though, so if you want to keep your current setup using the dirContents ivar as the "contentArray"... I think the only thing you probably have wrong is entering dirContents as the Object Class Name in the NSArrayController instead of the name of the actual model class.)

Hope I understood things enough to help!
George

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • RE: Help with NSArrayController, NSTableView and NSOpenPanel
      • From: "Kamrin Dahlin" <email@hidden>
References: 
 >Help with NSArrayController, NSTableView and NSOpenPanel (From: Kam Dahlin <email@hidden>)

  • Prev by Date: Nib files in memory
  • Next by Date: Re: Segemented control and icon alignement...
  • Previous by thread: Help with NSArrayController, NSTableView and NSOpenPanel
  • Next by thread: RE: Help with NSArrayController, NSTableView and NSOpenPanel
  • Index(es):
    • Date
    • Thread