Re: merging NSWindow and NSView controllers
Re: merging NSWindow and NSView controllers
- Subject: Re: merging NSWindow and NSView controllers
- From: Chris Hanson <email@hidden>
- Date: Sat, 19 Jun 2010 18:34:24 -0700
What kind of "drawing in their NSView" do these controllers do right now? Perhaps that code should be in an NSView subclass and that subclass should be used in both controllers' nibs.
-- Chris
On Jun 19, 2010, at 4:58 PM, Shane <email@hidden> wrote:
> I have an applications with two controllers, one inherits
> NSWindowController and uses initWithWindowNibName:, and the other
> inherits NSViewController and uses initWithNibName:
>
> Yet, other than the init function which uses different *.nib files in
> each, the rest of the code in the controller is exactly the same since
> it draws the same stuff in each NSView of each NIB file (both of which
> are custom views). In one NIB file the NSView is inside an NSWindow,
> and in the other NIB it's just an NSView. But each view has the same
> graphics contents, so it's pretty much duplicated. If I make changes
> to one, I pretty much have to do it to the other as well.
>
> Anyone have ideas on how to merge these?
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden