Re: NSButton image binding
Re: NSButton image binding
- Subject: Re: NSButton image binding
- From: Scott Anguish <email@hidden>
- Date: Tue, 2 May 2006 03:24:33 -0400
On May 2, 2006, at 12:05 AM, Ondra Cada wrote:
Hello,
forgive me please if the answer is self-evident, am working for 30-
odd hours now and perhaps my thinking got little fuzzy :)
Anyway, I've got the very plain array controller setup, which among
others contains a GUI button whose image is bound to a
selection.buttonImage. Which method returns somewhat different
image for different model object types.
That works swell, *but* my problem is that when more objects (with
different images) are selected, the button shows no icon at all. I
would need to display a selected one, and have no idea at the
moment how to ensure that?
when you have a multiple selection, you'll get a placeholder if the
values differ.
but image doesn't have a placeholder option you can set for that...
you may want to consider binding to selectedObjects instead, and use
a value transformer that returns different images based on the number
of items in the current selection (so an empty selection image if you
get zero items back, the first one for multiple, etc..)
oh, and go to sleep :-)
_______________________________________________
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