> On 17 Feb 2015, at 1:17 am, Dave <[email protected]> wrote: > > My initial thought were to have a WindowController: > > LTWMainWindowController that looks after a number of Windows. Initial there > is just one window LTWWindowX (but I want to add others in the future, > LTWWindowY, LTWWindowZ, etc.), each window looks after a different aspect of > the application. > > I was planning on having a separate Class for LTWMainWindowController and > LTWWindowX, LTWWindowY and LTWWindowZ. > > Does this sounds like a reasonable approach? >
This sounds very, very similar to the standard document architecture, except instead of a "master" window controller, you have a NSDocument subclass. That manages the data model, and keeps a list of any number of window controllers, each of which manages the particular window kind dsiplaying one aspect of the data model. Though normally NSDocument only has a single window controller, it is designed to have any number, for exactly the sort of scenario you have outlined. Of course NSDocument has become something of a complicated class in recent years, and it may be that it's just too much for your needs, but it's still well worth looking at, simply because it fits your outline and for all its complexity, works, has been debugged already. --Graham _______________________________________________ Cocoa-dev mailing list ([email protected]) Please 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
