Disabling items in NSTabView
Disabling items in NSTabView
- Subject: Disabling items in NSTabView
- From: "Daniel T. Staal" <email@hidden>
- Date: Tue, 29 May 2007 14:45:50 -0400 (EDT)
- Importance: Normal
In my app I provide the ability to 'lock' a file with a password, which
will allow viewing but not editing. (Basically.) What I'd like to do is
disable -- while still showing -- the editing controls on a locked file.
(So the user will have some idea of what types of things they could do if
they had the password.)
Conveniently, almost all of the controls to disable are in an NSTabView.
What I'd really like to do therefore is: [myTabView setEnabled:NO] and
have it disable everything in the tab view. Unfortunately, it appears no
one has written that method yet. ;) In fact, as far as I can see there
is no way to get a list of every item on the NSTabView programtically.
So far I've thought of three options of what to do instead:
1: Manually disable every item that is placed on any tab in the NSTabView.
2: Replace the NSTabView with a look-alike (maybe just an image) that is
disabled.
3: Say 'Fuck it' and just hide the whole thing unless the file is unlocked.
#3 is easiest, but hampers discovery in the app. #2 requires I make a
look-alike somehow, either with an image or by building a 'dummy' tab
view. #1 would work, but is a lot of manual work and looks to be an
invitation to bug city. (All I have to do is forget one someplace...)
Can anyone here think of a better idea? Is there a good way to get a list
of all the controls on an NSTabView?
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