Obvious NSSegmentedControl Bug?
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