• 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: NSSegmentedControl subclass and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSegmentedControl subclass and bindings


  • Subject: Re: NSSegmentedControl subclass and bindings
  • From: mmalc Crawford <email@hidden>
  • Date: Fri, 29 Jun 2007 03:18:53 -0700


On Jun 28, 2007, at 11:41 PM, Dorian Johnson wrote:

I have a custom NSSegmentedControl that has non-standard width, thus, I'm subclassing mouseDown and mouseUp to select the proper segment. This works fine, but now I need to use bindings with the selectedIndex property. I can't get it to work at all, though... any pointers?
Here's my mouseUp method:
unsigned newSelectedSegment; // assume this is calculated and valid
[self willChangeValueForKey:@"selectedSegment"];
[self setSelectedSegment: newSelectedSegment];
[self didChangeValueForKey:@"selectedSegment"];
I've tried using willChangeValueForKey with selectedIndex but that did nothing to resolve the problem. Any tips on how to get my subclassing behaving with bindings?


This general issue has come up several times in the past week or so.
See recent archives and <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html >


mmalc

_______________________________________________

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: NSSegmentedControl subclass and bindings
      • From: Dorian Johnson <email@hidden>
References: 
 >NSSegmentedControl subclass and bindings (From: Dorian Johnson <email@hidden>)

  • Prev by Date: Re: NSURLRequest check
  • Next by Date: Window Doesn't Show Save Panel. How to Debug?
  • Previous by thread: NSSegmentedControl subclass and bindings
  • Next by thread: Re: NSSegmentedControl subclass and bindings
  • Index(es):
    • Date
    • Thread