• 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: Conditionally enable a button based on NSArrayController's selectedObjects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conditionally enable a button based on NSArrayController's selectedObjects?


  • Subject: Re: Conditionally enable a button based on NSArrayController's selectedObjects?
  • From: Mike Abdullah <email@hidden>
  • Date: Sat, 29 Apr 2006 10:45:47 +0100

Ah, fair point. I've only worked with editable tables myself so this problem hadn't occurred to me.

I guess in which case, bind to [arrayController selectedObjects] and use a value transformer to get true or false out.

Mike.

On 28 Apr 2006, at 23:01PM0, Ondra Cada wrote:

Mike,

On 28.4.2006, at 23:43, Mike Abdullah wrote:

Or there is the better option of binding enabled of the button to canRemove of the array controller.

Well... I'm using this shortcut sometimes myself, but far as we are giving advices, a good one is to beware that it is possible there are selected objects and you cannot remove (e.g., if the data are not editable).
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc




_______________________________________________ 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: 
 >Conditionally enable a button based on NSArrayController's selectedObjects? (From: John Fox <email@hidden>)
 >Re: Conditionally enable a button based on NSArrayController's selectedObjects? (From: Ondra Cada <email@hidden>)
 >Re: Conditionally enable a button based on NSArrayController's selectedObjects? (From: Mike Abdullah <email@hidden>)
 >Re: Conditionally enable a button based on NSArrayController's selectedObjects? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Should I prefix my private instance variables?
  • Next by Date: Re: show and hide NSWindow
  • Previous by thread: Re: Conditionally enable a button based on NSArrayController's selectedObjects?
  • Next by thread: awakeFromNib and toolbar creation
  • Index(es):
    • Date
    • Thread