• 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: Using multiple bindings to enable a button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using multiple bindings to enable a button


  • Subject: Re: Using multiple bindings to enable a button
  • From: Steve Mills <email@hidden>
  • Date: Tue, 10 Feb 2015 23:45:07 -0600

On Feb 10, 2015, at 23:04:02, Quincey Morris <email@hidden> wrote:
>
> Are you sure that the “comboStringValue” property is KVO-compliant? Is it a NSString or a NSMutableString?

I'm not sure about the KVO compliancy. I'm still a newbie in this area. Let me give you the rundown on the stuff that deals with it.

@interface WindController : NSWindowController
@property (weak) NSString* comboStringValue;
@end

The window has:

A Combobox binds its Value to File's Owner.self.comboStringValue, because I've learned you can't bind directly to a field's stringValue.

A button binds its Enabled to File's Owner.self.comboStringValue.length.

Another button binds its Enabled to Keywords Array Controller.selection.@count and its Enabled2 to File's Owner.comboStringValue.length.

The 2nd button is the one that doesn't behave when the bindings are in that order. Swapping them fixes it. I've tried swapping them back to the original orientation multiple times, and it always fails to work properly when they're in that order.

--
Steve Mills
Drummer, Mac geek


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Using multiple bindings to enable a button
      • From: Quincey Morris <email@hidden>
References: 
 >Using multiple bindings to enable a button (From: Steve Mills <email@hidden>)
 >Re: Using multiple bindings to enable a button (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Using multiple bindings to enable a button
  • Next by Date: Re: Using multiple bindings to enable a button
  • Previous by thread: Re: Using multiple bindings to enable a button
  • Next by thread: Re: Using multiple bindings to enable a button
  • Index(es):
    • Date
    • Thread