Re: Cocoa equivalent for SetWindowProperty in Carbon
Re: Cocoa equivalent for SetWindowProperty in Carbon
- Subject: Re: Cocoa equivalent for SetWindowProperty in Carbon
- From: Charles Srstka <email@hidden>
- Date: Thu, 19 Apr 2012 01:13:56 -0500
On Apr 19, 2012, at 1:10 AM, Sanjay Arora wrote:
> I am creating the NSWindow programmatically, and does not have a
> NSWindowController. I want to associate some model with the window. I am
> not using NSDocument. In Carbon, SetWindowProperty allowed me to set the
> model with the window. But I don't find anything in Cocoa.
>
> May be the controller which is used to create the window could be
> associated with the NSWindow. How?
Use an NSWindowController subclass. Initialize it with -initWithWindowNibName: if you’re loading the window from a xib, or -initWithWindow: if you’re creating the window in code.
Charles
_______________________________________________
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