NSTabView; How to get the current / active tab ..?
NSTabView; How to get the current / active tab ..?
- Subject: NSTabView; How to get the current / active tab ..?
- From: Martin Batholdy <email@hidden>
- Date: Sun, 7 Jun 2009 20:14:04 +0200
hi,
I have an IBOutlet defined in my header;
IBOutlet NSTabView *tabView;
This Outlet is connected with a TabView generated with Interface
Builder.
The TabView has two tabs,
and in my implementation file I want to do something when tab1 is
active and something else when tab2 is active.
I tried the following;
NSTabViewItem *tabViewItemX;
tabViewItemX = [tabView selectedTabViewItem];
if([tabViewItemX isEqualTo:[tabView tabViewItemAtIndex:0]]){
NSLog(@"1");
} else{
NSLog(@"2");
}
But it doesn't work properly. It is just always "2".
What do I wrong?
thanks!
_______________________________________________
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