Enabling/Disabling specific rows in an NSTableView with Cocoa Bindings
Enabling/Disabling specific rows in an NSTableView with Cocoa Bindings
- Subject: Enabling/Disabling specific rows in an NSTableView with Cocoa Bindings
- From: Ryan Homer <email@hidden>
- Date: Tue, 30 Jan 2007 18:09:20 -0500
- Resent-date: Tue, 30 Jan 2007 19:29:09 -0500
- Resent-from: Ryan Homer <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: Apple Cocoa-Dev Mailing List <email@hidden>
Hello everyone.
I have an NSTableView that is being populated using Cocoa Bindings
and Core Data. I have a custom managed object with a function that
will calculate whether a particular record should show as an enabled
or disabled row (well, it really only returns NO for the moment for
testing). That is, there are times when I want to display a record
but not allow the user the select or double-click it.
I've tried binding the NSTableView's as well as its NSTableColumn's
enabled property, with Bind to: set to the appropriate array
controller, Controller Key: set to arrangedObjects (I also tried
selection and a few others), and the Model Key Path: set to the
transient attribute that simply returns (BOOL)NO at the moment (I've
also tried returning [NSNumber numberWithBOOL:NO]). However, my rows
are never disabled. After searching through the documentation, it
seems to me that these enabled properties are for enabling/disabling
the table and column resp. and not the row.
Is there a way to disable the row through bindings or do I need to
implement the tableView:shouldSelectRow?
THANKS!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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