• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Disabling items in NSTabView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling items in NSTabView


  • Subject: Re: Disabling items in NSTabView
  • From: "Daniel T. Staal" <email@hidden>
  • Date: Tue, 29 May 2007 17:06:11 -0400 (EDT)
  • Importance: Normal

On Tue, May 29, 2007 4:51 pm, Erik Buck said:
> 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];

Thanks, that was exactly what I was looking for. ([self subviews]  That's
the method I missed...) I'll try it out when I get home.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

_______________________________________________

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

References: 
 >Re: Disabling items in NSTabView (From: Erik Buck <email@hidden>)

  • Prev by Date: Re: memory mgmt in convenience and accessor methods
  • Next by Date: Re: NSArray lookup, pointer comparison
  • Previous by thread: Re: Disabling items in NSTabView
  • Next by thread: [MEET] June CocoaHeads Meetings
  • Index(es):
    • Date
    • Thread