Commit | Line | Data |
---|---|---|
805e021f CE |
1 | // |
2 | // ViewUtility.m | |
3 | // AFSCommander | |
4 | // | |
5 | // Created by Claudio Bisegni on 25/12/07. | |
6 | // Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved. | |
7 | // | |
8 | ||
9 | #import "ViewUtility.h" | |
10 | ||
11 | ||
12 | @implementation ViewUtility | |
13 | +(void) enbleDisableControlView:(NSView*)parentView | |
14 | controlState:(BOOL)controlState | |
15 | { | |
16 | if(!parentView) return; | |
17 | NSArray *views = [parentView subviews]; | |
18 | for(int idx = 0; idx < [views count]; idx++) | |
19 | { | |
20 | NSObject *obj = [views objectAtIndex:idx]; | |
21 | if([obj isKindOfClass:[NSButton class]]) | |
22 | { | |
23 | [(NSButton*)obj setEnabled:controlState]; | |
24 | //[obj performSelector:@selector(setEnabled:) withObject:controlState]; | |
25 | } | |
26 | } | |
27 | ||
28 | } | |
29 | @end |