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

Re: Binding NSPopUpButton with Option "Inserts Null Placeholder"


  • Subject: Re: Binding NSPopUpButton with Option "Inserts Null Placeholder"
  • From: email@hidden
  • Date: Mon, 29 May 2006 21:51:47 +0200

Hello,

No one who could help me? Would be really nice to get some help, I've already
spent a lot of time in my application and now I can't finish because of that
error.

Gian Marc


Zitat von email@hidden:

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




_______________________________________________ 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
References: 
 >Binding NSPopUpButton with Option "Inserts Null Placeholder" (From: email@hidden)

  • Prev by Date: Re: make sure one timer fire before another
  • Next by Date: NSMatrix -objectValue always gives 1. What good is that?
  • Previous by thread: Binding NSPopUpButton with Option "Inserts Null Placeholder"
  • Next by thread: Re: Binding NSPopUpButton with Option "Inserts Null Placeholder"
  • Index(es):
    • Date
    • Thread