Re: Design Dilemma ...
Re: Design Dilemma ...
- Subject: Re: Design Dilemma ...
- From: SA Dev <email@hidden>
- Date: Wed, 22 Jun 2005 09:10:07 -0400
Ah - I've caught my assumption. The docs say of the content
binding, "An NSArrayController instance that provides the content of
the NSPopUpButton."
Clearly this won't work for me. It's looking like the best way to
go would be to use the willDisplayCell... table method to present the
right set of choices and just rely on the selectedObject key for the
selection.
On Jun 22, 2005, at 8:48 AM, SA Dev wrote:
Well, except that I am also really hoping to use bindings. :-/
Thanks to an off-list reply, a solution that seems workable is to
create an 'availableResponses' key and return an array of responses
(just NSNumbers; I use a value transformer to get the display names).
I've done that and bound the popup's 'content' binding to the
Actions controller's arrangedObjects.availableResponses. I've also
bound the 'contentValues' binding to
arrangedObjects.availableResponses and used the value transformer.
The 'selectedObject' binding is bound to arrangedObjects.response.
Here's the *current* problem. ;-) Though the -availableResponses
key is accessed (NSLog tells me so), the popup *only* displays the
Action's -response. It doesn't show any of the other options from -
availableResponses.
Any clues? If bindings isn't possible, I guess I'll have to go
back to the datasource approach and give that a try (thanks, Uli -
I should have more faith in Cocoa ;-)).
On Jun 22, 2005, at 4:32 AM, M. Uli Kusterer wrote:
That's not a problem. As the parameters indicate, willDisplayCell
is called for each row. So each time a cell needs to be drawn for
a row, you'll get the right menu items in its popup cell. Stop
worrying and just try it. It'll Just Work(tm).
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net
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