Re: NSTableView and multiple NSArrayControllers
Re: NSTableView and multiple NSArrayControllers
- Subject: Re: NSTableView and multiple NSArrayControllers
- From: Gabriele de Simone <email@hidden>
- Date: Mon, 26 Apr 2004 09:34:16 -0400
On Apr 26, 2004, at 1:22 AM, Scott Anguish wrote:
On Apr 26, 2004, at 12:38 AM, Gabriele de Simone wrote:
I just noticed that IB shows three bindings for an NSTableView
(content, selectionIndexes, sortDescriptors) whereas calling NSLog on
[NSTableView exposedBindings] only displays two (rowHeight, value).
Why the discrepancy? Where are those bindings really exposed?
[...]
when you create a binding for a NSTableColumn, the content binding is
created automatically for you for that particular tableview... but, it
doesn't set the content binding through the bind: API that you use.
You need to explicitly set the
Also.. I don't think you can have multiple arraycontrollers wired to
a single tableview.
I am only using a second NSArrayController to populate the
NSPopUpMenuCell's in a table column, as shown in one of the ubiquitous
Cocoa examples. The problem is that the menu is getting populated with
things like <SomeObject 0xSOMEADDR> instead of the original objects,
even though the array returned to the table is valid both in content
and in number of elements. My suspicion was that binding the
NSTableView sortDescriptors manually to the NSArrayController was
screwing things up. Is sortDescriptors also automatically bound to the
array controller?
I will abuse yours (and everyone else's) help for one more question:
when using KVC to expose a variable that we want to be read-only, is it
sufficient to simply not provide the setter method? Will the runtime
infer from the absence of a setter method that the variable is
immutable?
Thanks,
Gabe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.