Re: NSTableView and multiple NSArrayControllers
Re: NSTableView and multiple NSArrayControllers
- Subject: Re: NSTableView and multiple NSArrayControllers
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 26 Apr 2004 08:45:47 -0700
On Apr 26, 2004, at 6:34 AM, Gabriele de Simone wrote:
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?
Have you established the popup's contentValues binding?
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?
Yes. You might therefore bind your popup's contentValues to:
[ArrayController].arrangedObjects.readOnlyDescriptor
mmalc
(Whose hair is neither white nor spiky.)
_______________________________________________
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.