• 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: Using popup to select table items to display (Core Data app)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using popup to select table items to display (Core Data app)


  • Subject: Re: Using popup to select table items to display (Core Data app)
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 23 May 2010 11:34:19 -0700

On 2010 May 23, at 09:07, Paul Johnson wrote:

> I'm looking for an example of the use of a popup menu to determine the array
> items to display in a tableview. I'm trying to use Core Data and do this in
> Interface Builder as much as possible.

I can't think of any sample code to show exactly this, but it should not be too difficult.  As always, bind your table column(s) through an array controller.  Bind the 'Content Array' of the array controller to some object which will dynamically provide the array you desire.  Pulling an example out one of my document-based Core Data projects, I've bound it to File's Owner which is a window controller.  The Model Key Path is document.myDynamicArray, and then in your document object implement myDynamicArray to return an array which would depend on the popup selection.

Alternatively, you might be able to do this with less code by setting the representedObject of each menu item in your popup menu to a desired array, and then binding the 'Content Array' of the array controller to this popup button with Model Key Path selectedItem.representedObject, or something like that.

_______________________________________________

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

References: 
 >Using popup to select table items to display (Core Data app) (From: Paul Johnson <email@hidden>)

  • Prev by Date: Re: Core Data NSPopUpButtonCell and NSNumber
  • Next by Date: Re: getting file creation date from NTFS
  • Previous by thread: Using popup to select table items to display (Core Data app)
  • Next by thread: Core Data NSPopUpButtonCell and NSNumber
  • Index(es):
    • Date
    • Thread