Re: Obvious NSSegmentedControl Bug?
Re: Obvious NSSegmentedControl Bug?
- Subject: Re: Obvious NSSegmentedControl Bug?
- From: Peter Ammon <email@hidden>
- Date: Mon, 13 Apr 2009 16:17:50 -0700
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