Tab View Delegate
Tab View Delegate
- Subject: Tab View Delegate
- From: "Robinson, Josh D" <email@hidden>
- Date: Mon, 28 Jun 2004 12:10:23 -0400
- Thread-topic: cocoa-dev digest, Vol 2 #4417 - 4 msgs
Dear List,
I am having problems getting a tab view delegate to work ( at this point I am not so sure that it is even a delegate I need to use). The problem is that I have a tab view in a window. Each of the panels on the view has some stuff that I need to clear whenever a I change tabs ( its a few text fields that I need to reset). I thought at first that I just need to use the -(void) tabView: (NSTabView *)tabview didSelectTabViewItem:(NSTabviewItem *)tabViewItem. But 1- I could not get this to work, 2- I don't even think it is what I want.
Below is the code that I have, The delegate for startup works but not for switching tabs. Thanks for the help!
In Contol.h-
@interface Control(NSApplicationNotifications)
-(void)applicationDidFinishLaunching:(NSNotification*)notification;
- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem;
@end
In Control.m-
@implementation Control(ApplicationNotifications)
- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem
{
NSLog(@"Tab Switch");
// Do cleanup stuff
}
-(void)applicationDidFinishLaunching:(NSNotification*)notification
{
// Do load stuff
}
@end
==============================================================================
The contents of this message, together with any attachments, are intended only for the use of the person(s) to which they are addressed and may contain confidential and/or privileged information. Further, any medical information herein is confidential and protected by law. It is unlawful for unauthorized persons to use, review, copy, disclose, or disseminate confidential medical information. If you are not the intended recipient, immediately advise the sender and delete this message and any attachments. Any distribution, or copying of this message, or any attachment, is prohibited.
==============================================================================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.