• 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
Handling a Null PlaceHolder on a Bound PopUp (with CoreData)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling a Null PlaceHolder on a Bound PopUp (with CoreData)


  • Subject: Handling a Null PlaceHolder on a Bound PopUp (with CoreData)
  • From: Herve Bouvier <email@hidden>
  • Date: Wed, 18 May 2005 17:34:35 +0200

Hi All,

I made the core-data tutorial and I try now to go a little deeper in the concept.

So i replaced the search-Field (and it's search-predicates) by a popup bound to an Array-Controller of the Employees like this:
- Content: bind to EmployeesPopUpController / controller Key: arranged-Objects / Model Key Path: none
- Content Value: bind to EmployeesPopUpController / controller Key: arranged-Objects / Model Key Path: fullNameAndID
- Selected Index: bind to EmployeesPopUpController / controller Key: selection-Index / Model Key Path: none

Then i bounded the EmployeesArrayController's Filter Predicate to the EmployeesPopUpController's selected Objects using a custom Transformer that return an appropriate NS-Predicate when it receive an entity (Employee) and nothing if no Employee is select in the popUp.

This work fine, it's great.

But i can't figure out how to handle a null place Holder in my popUp ?
If i choose "Insert a Null PlaceHolder when i bind the Content of the popUP the bound of Selected Index refuse the "null choice"
In fact i don't know how to bind the selection of the popUp accordingly to the presence of a Null Place Holder ?

It seems i can't insert programatically a "no selection Element" in the array-Controller since this controller use the managedObjectContext and its content-Set is bound to a "Department" entity ( DepartmentController / Selection / Employee )

I did not find help in the archives and i am stuck to this since 3 days, any help would be appreciated.

Thanks
Herve Bouvier


 _______________________________________________
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

  • Prev by Date: Re: Can NSCell draw both an icon and text?
  • Next by Date: Re: Can NSCell draw both an icon and text?
  • Previous by thread: Re: Loading already scaled JPEGs
  • Next by thread: NSMovie and DisposeMovie
  • Index(es):
    • Date
    • Thread