I would like my application to run on X.6, but also implement features introduced in X.7
In the case of NSWindowRestoration, I'm stuck.
Calling member functions which may or may not exist seems easy enough, I think:
What I can't figure out is how to instance an NSWindowController which does or doesn't conform to <NSWindowRestoration>. It's like I need two separate classes:
and
and I need to runtime pick which one gets instantiated, somehow from the X.6 code which knows nothing about a <NSWindowRestoration> protocol.
Can it be done, or am I peeing in the wind here? The decision to call or not call a member function was so easy, after all...
In the case of NSWindowRestoration, I'm stuck.
Calling member functions which may or may not exist seems easy enough, I think:
Code:
SEL setRestoreClassSel = NSSelectorFromString(@"setRestorationClass");
if ( [self respondsToSelector:setRestoreClassSel] )
[self performSelector:setRestoreClassSel withObject:[self class]];
What I can't figure out is how to instance an NSWindowController which does or doesn't conform to <NSWindowRestoration>. It's like I need two separate classes:
Code:
@interface MyWindTrol6 : NSWindowController
Code:
@interface MyWindTrol7 : NSWindowController <NSWindowRestoration>
Can it be done, or am I peeing in the wind here? The decision to call or not call a member function was so easy, after all...