• 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
Binding NSPopUpButton with Option "Inserts Null Placeholder"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding NSPopUpButton with Option "Inserts Null Placeholder"


  • Subject: Binding NSPopUpButton with Option "Inserts Null Placeholder"
  • From: email@hidden
  • Date: Sun, 28 May 2006 16:25:47 +0200

Hello,
I hope somebody could help me, spent already days for solving the following
problem with a NSPopUpButton and Bindings:

I have an NSPopUpButton and an NSArrayController bound to it. The
NSArrayController gets the data from CoreData. Because I need a 'no region'
menu item in the NSPopUpButton, I selected the option "Inserts Null
Placeholder" for the binding.

All works fine, except for the "no region" menu item, which throws an exception
"[<NSArrayController 0x1116450> setNilValueForKey]: could not set nil as the
value for the key selectionIndex." when selecting it.

What's wrong?

Here's how I set up the binding for the ArrayController:

I have a NSPopUpButton with the follwing Bindings:
content:
  Bind To: regionController (NSArrayController)
  Controller Key: arrangedObjects
  x Inserts Null Placeholder (because I need a menu item 'no region')

contentValues:
  Bind To: regionController (NSArrayController)
  Controller Key: arrangedObjects
  Model Key Path: name
  x Inserts Null Placeholder (because I need a menu item 'no region')
  Null Placeholder: no region

selectedIndex:
  Bind To: regionController (NSArrayController)
  Controller Key: selectionIndex


Thanks for helping!
Marc

 _______________________________________________
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: Binding NSPopUpButton with Option "Inserts Null Placeholder"
      • From: email@hidden
    • Re: Binding NSPopUpButton with Option "Inserts Null Placeholder"
      • From: email@hidden
  • Prev by Date: 2Qs
  • Next by Date: Re: 2Qs
  • Previous by thread: Re: 2Qs
  • Next by thread: Re: Binding NSPopUpButton with Option "Inserts Null Placeholder"
  • Index(es):
    • Date
    • Thread