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

Re: Obvious NSSegmentedControl Bug?


  • Subject: Re: Obvious NSSegmentedControl Bug?
  • From: Seth Willits <email@hidden>
  • Date: Mon, 13 Apr 2009 20:24:39 -0700


Filed. #6787552. Thanks.


-- Seth Willits




On Apr 13, 2009, at 4:17 PM, Peter Ammon wrote:

This looks like a bug. I appreciate your taking the time to check and hopefully to file it.

-Peter

On Apr 12, 2009, at 1:22 PM, Seth Willits wrote:


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?





_______________________________________________

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


References: 
 >Obvious NSSegmentedControl Bug? (From: Seth Willits <email@hidden>)
 >Re: Obvious NSSegmentedControl Bug? (From: Peter Ammon <email@hidden>)

  • Prev by Date: Re: stopping an application
  • Next by Date: Re: Best way to get a non-repeating random number?
  • Previous by thread: Re: Obvious NSSegmentedControl Bug?
  • Next by thread: Converting String Representations at Runtime
  • Index(es):
    • Date
    • Thread