Re: PopUp button + Controller Layer (more)
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.