• 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
Obvious NSSegmentedControl Bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Obvious NSSegmentedControl Bug?


  • Subject: Obvious NSSegmentedControl Bug?
  • From: Seth Willits <email@hidden>
  • Date: Sun, 12 Apr 2009 13:22:35 -0700



I need a sanity check before I file a bug report.



sc is a 3-segment NSSegmentedControl with either Select One or Select Any as its mode. Segment 1 (the middle one) is selected in IB. Triggered as an action:


NSLog(@"Before:"); NSLog(@" %d", [sc selectedSegment]); NSLog(@" %@", [sc isSelectedForSegment:0] ? @"YES" : @"NO"); NSLog(@" %@", [sc isSelectedForSegment:1] ? @"YES" : @"NO"); NSLog(@" %@", [sc isSelectedForSegment:2] ? @"YES" : @"NO");

[sc setSelected:NO forSegment:[sc selectedSegment]];

NSLog(@"After:");
NSLog(@"  %d", [sc selectedSegment]);
NSLog(@"  %@", [sc isSelectedForSegment:0] ? @"YES" : @"NO");
NSLog(@"  %@", [sc isSelectedForSegment:1] ? @"YES" : @"NO");
NSLog(@"  %@", [sc isSelectedForSegment:2] ? @"YES" : @"NO");


Before: 1 NO YES NO

After:
  1
  NO
  NO
  NO


selectedSegment: "[Returns t]he index of the currently selected segment, or -1 if no segment is selected."



No segment is selected so selectedSegment should clearly be -1, right?


10.5.6


-- Seth Willits





--
Seth Willits



_______________________________________________

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: Obvious NSSegmentedControl Bug?
      • From: Peter Ammon <email@hidden>
  • Prev by Date: Re: Build Settings for Release: App/Library is bloated
  • Next by Date: Re: Build Settings for Release: App/Library is bloated
  • Previous by thread: Re: Build Settings for Release: App/Library is bloated
  • Next by thread: Re: Obvious NSSegmentedControl Bug?
  • Index(es):
    • Date
    • Thread