Thank you!

I'm trying your suggestions now.

Bruce
On Jan 27, 2011, at 6:28 PM, Quincey Morris wrote:

> On Jan 27, 2011, at 17:10, Bruce Cresanta wrote:
> 
>>      I have an NSDocument instance in my IB!  It was the only way I could 
>> hook up a connection to a controlView for the window that gets created for 
>> the document.
>> 
>> Do you know a way to programmatically retrieve the controlView for the 
>> window that gets created for the document?   
>> This would enable me to forget IB altogether, which is not a problem because 
>> I'm using all custom controls written from scratch.
> 
> What's the NIB's File's Owner object? The document, or a window controller?
> 
> If the document, you can connect NIB objects directly to the File's Owner 
> proxy. (Make sure you set it to the correct NSDocument subclass in IB's 
> Identity panel.)
> 
> If the window controller, you should probably be doing all this stuff in the 
> window controller instead. Note, though, that a window controller has a 
> "document" property which allows you to get to the document through it.
> 
> If your controls are all custom code, they can find the document directly (as 
> 'self.window.windowController.document'), provided that the controls have 
> already been added to a view that's been already added to the window. You may 
> not need to create any outlets at all.
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to