• 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: PopUp button + Controller Layer (more)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PopUp button + Controller Layer (more)


  • Subject: Re: PopUp button + Controller Layer (more)
  • From: René Puls <email@hidden>
  • Date: Thu, 13 Nov 2003 06:20:55 +0100

Hi,

Am 12.11.2003 um 21:00 schrieb mmalcolm crawford:
I've put together an example here: <http://homepage.mac.com/mmalc/CocoaExamples/Popups.zip>. It also illustrates sorting a column using a custom sort key, and use of value transformer to display the text of a row in a different colour.

Summary at: <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>

I have also been trying to use an NSPopUpButton together with an NSArrayController, but for a different purpose: I need it to change the current selection in an array controller.

The closest solution I found would be the following bindings for the popup button in your example (remove all other bindings first):

contentValues bound to ToDos.arrangedObjects.what
selectedIndex bound to ToDos.selectionIndex

This shows the titles of all ToDo entries in the popup button, and synchronizes the selection in the table with that of the button. But: If no item is selected, the button always displays the title "2147483647". And I have no idea why it does that. Everything else seems to work fine, though.

Kind regards,
Rene Puls
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >PopUp button + Controller Layer (From: Raphael Sebbe <email@hidden>)
 >Re: PopUp button + Controller Layer (From: mmalcolm crawford <email@hidden>)
 >Re: PopUp button + Controller Layer (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Launch crash in strstr... what gives?
  • Next by Date: Re: Terminate on Close
  • Previous by thread: Re: PopUp button + Controller Layer
  • Next by thread: NSBezierPath retain crash
  • Index(es):
    • Date
    • Thread