Re: Tabs and Documents Design Considerations
Re: Tabs and Documents Design Considerations
- Subject: Re: Tabs and Documents Design Considerations
- From: Jerry Krinock <email@hidden>
- Date: Thu, 17 Aug 2006 21:29:51 -0700
- Thread-topic: Tabs and Documents Design Considerations
on 06/08/16 11:45, Dimitri Bouniol at email@hidden wrote:
> In my NSDocument-Based App, I would like to feature tabs in the
> windows, so multiple NSDocuments can share the same real-estate. I
> would also like to be able to drag tabs between windows, or to drag
> them in a empty space to create a new window. How should I organize
> this with my classes? Should I:
> - Have a mutable array of window controllers and a mutable array of
> documents (without their own window controllers)
> - Have a mutable array of window controllers and a mutable array of
> documents with their own window controllers that don't have windows
> - Have a mutable array of window controllers and a mutable array of
> documents with their own window controllers that have a custom
> subclass of NSWindow
None of the above. You'll want a single mutable array of "documents". Each
document might have an NSTabViewItem as an instance variable. Your window
will have one windowController. Having what are essentially instance
variables spread across multiple arrays is problematic. Think "objects".
_______________________________________________
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