• 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
Core Data, NSPopUpButton, and "Edit..."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data, NSPopUpButton, and "Edit..."


  • Subject: Core Data, NSPopUpButton, and "Edit..."
  • From: Adam Ernst <email@hidden>
  • Date: Fri, 25 May 2007 22:27:22 -0500

I am using Cocoa bindings to display the objects of a certain entity in an NSPopUpButton. (It sets a relationship for another entity--like the "Chef" menu in the Core Recipes example.)

Currently I have the standard Cocoa bindings setup: "content" bound to "MyNSArrayController.arrangedObjects", "contentValues" bound to "MyNSArrayController.arrangedObjects.name". This works fine.

I want to add one more item to the NSPopUpButton: "Edit...", which would open a sheet to edit the entities represented in the pop-up button. (Again, akin to allowing the user to not just select a chef but edit them.) I'd capture such a selection and display the sheet.

Obviously the existing binding to NSArrayController won't work. What's the best way to replace this binding? So far I've tried the "mixing static and dynamic" technique described by mmalc:
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html


But I'm hopelessly lost--I don't know how to combine that technique with array controllers and bindings to boot! Any advice?

Adam Ernst

_______________________________________________

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: Core Data, NSPopUpButton, and "Edit..."
      • From: "Sean Willson" <email@hidden>
  • Prev by Date: NSTreeController vs. representedObject
  • Next by Date: Re: NSImage question
  • Previous by thread: NSTreeController vs. representedObject
  • Next by thread: Re: Core Data, NSPopUpButton, and "Edit..."
  • Index(es):
    • Date
    • Thread