Design patterns
Design patterns
- Subject: Design patterns
- From: Trygve Inda <email@hidden>
- Date: Sun, 23 Jul 2006 11:46:31 +0000
- Thread-topic: Design patterns
I am wondering what the general consensus is on handling sheets. I currently
have two simple sheets managed by my AppController which require a few
methods:
- (IBAction)showPluginWindow:(id)sender
- (void)pluginTableDoubleClick:(id)sender
- (IBAction)okButtonAction:(id)sender
- (IBAction)cancelButtonAction:(id)sender
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode
contextInfo:(void *)contextInfo
I have similar methods for a prefs sheet. Should these be put into separate
objects?
Both sheets act upon data that the main app needs to know about, although
with the prefs sheet I have a dict in my main app that just has a series of
keys for the user preferences.
The sheets are stored in my main nib file. Is there any advantage to moving
them to their own nib and making the separate objects?
If I had a complex window that really needed a window Controller, I would
use a different nib and make it an object, but for relatively simple sheets
with a few controls, what do the masses think?
I guess some of this leads to... How many methods in a class is reasonable
and is there any way (good idea?) to move some of them into a separate
source file. (Can, or is it normal for a class have more then one .m file?)
Thanks,
Trygve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden