Re: Cocoa Binding with NSArrayController and NSMutableArray
Re: Cocoa Binding with NSArrayController and NSMutableArray
- Subject: Re: Cocoa Binding with NSArrayController and NSMutableArray
- From: Quincey Morris <email@hidden>
- Date: Mon, 3 Jan 2011 15:41:25 -0800
On Jan 3, 2011, at 14:32, Tilo Villwock wrote:
> Hmm doesn't work anyways. In the attributes section of the NSArrayController there is a section that's called "Object Controller". That is the one where the type of class needs to be specified the array contains, right?
The class only matters if the array controller is going to be asked to create an object on your behalf. For example, if you have an "Add" button whose target is the array controller and whose action is 'add:'. Otherwise, it's not used for anything AFAIK.
> Also why would I uncheck "Visible at launch"? I mean I would have to do this programmatically if I wanted to see my window then, right?
1. It doesn't really mean "at launch", it means "at NIB loading" -- which happens to be at launch time for the main menu NIB, but often not for other NIBs.
2. In most applications except the most basic, it's desirable to put windows under the control of a window controller, and in that case you don't want the window to be created before the window controller is initialized, which is what would happen if the window was marked "visible at launch". The usual way to get the window created is to request its window controller's "window" property, or to send the window controller a 'showWindow:' action message.
3. Some apps have a singleton main window, but many and perhaps most don't.
Therefore, the usefulness of "visible at launch" is pretty much limited to apps that have a singleton main window that's always displayed but which isn't under the control of a window controller. Such apps are typically only tutorial exercises, or quick-and-dirty one-off utilities.
Of course, none of that helps with finding what's wrong with your table view. :)
_______________________________________________
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