• 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: NSButton image binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSButton image binding (From: Ondra Cada <email@hidden>)

  • Prev by Date: Help with nodesForXPath
  • Next by Date: Bonjour and sending data
  • Previous by thread: NSButton image binding
  • Next by thread: Key binding text field
  • Index(es):
    • Date
    • Thread