Re: elegant sheet cascade handling?
Re: elegant sheet cascade handling?
- Subject: Re: elegant sheet cascade handling?
- From: Martin Wierschin <email@hidden>
- Date: Tue, 10 Apr 2007 18:55:43 -0700
Has anyone come up with an elegant, maintainable, legible way to
express a
logical process that is periodically interspersed with sheets shown
to the
user?
If the process is complicated enough I like to wrap it up in a class
of its own. That way all the state information is contained in the
instance, eg:
@interface XXOperation : NSObject {
id _delegate;
void* _delegateContext;
}
+ (XXOperation*) startOperationInWindow:(NSWindow*)win withDelegate:
(id)del contextInfo:(void*)info ;
- (void*) delegateContextInfo ;
@end
@protocol XXOperationDelegate
- (void) operationDidComplete:(XXOperation*)op ;
@end
The class itself manages chaining together the sheets as it sees fit.
Eg: use one of the methods the other posters talked about, like a
simple switch( state ).
~Martin
_______________________________________________
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