Re: Disabling items in NSTabView
Re: Disabling items in NSTabView
- Subject: Re: Disabling items in NSTabView
- From: Erik Buck <email@hidden>
- Date: Tue, 29 May 2007 13:51:38 -0700 (PDT)
Offthe top of my head written in Mail:
@interface NSView (MYDisablingProtocol)
- (void)recursivelyDisableSubviews;
@end
@implementation NSView (MYDisablingProtocol)
- (void)recursivelyDisableSubviews
{
if([self respondesToSelector(@selector(setEnabled:)])
{
[self setEnabled:NO];
}
else
{
[[self subviews] makeObjectsPerformSelector:@selector(recursivelyDisableSubviews)];
}
}
@end
To use:
[myNSTabViewItem recursivelyDisableSubviews];
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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