• 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: elegant sheet cascade handling?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >elegant sheet cascade handling? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: NSButtoncell in NSTableView.....
  • Next by Date: Validating Image File Drag and Drops
  • Previous by thread: Re: elegant sheet cascade handling?
  • Next by thread: Re: elegant sheet cascade handling?
  • Index(es):
    • Date
    • Thread