• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bindings: enabled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bindings: enabled


  • Subject: Bindings: enabled
  • From: Ryan Homer <email@hidden>
  • Date: Thu, 8 Feb 2007 09:36:09 -0500

There seems to be very little to no information available for some bindings and in particular, I'm trying to figure out "enabled" which shows up in several places. If you click on an NSTableView in IB, for example, there is an enabled binding under Availability. You also have this for each NSTableColumn. I am trying to control whether an entire row is enabled or not, so I discounted setting the binding for the column. I'm am thinking that whether the "enabled" attribute works for a row or the entire table itself depends on the Controller Key, as this is how the doubleClickArgument works.

To be more specific, I have my NSTableView's bindings set up as follows:

doubleClickArgument:
Bind To: Contact List Controller
Controller Key: selectedObjects
Model Key Path: name
Selector Name: rowDoubleClicked:

(List Controller is a custom NSArrayController)

This works well, making each row double-clickable and sends a rowDoubleClicked: message with the name of the contact listed in the row. Now, I want to do something similar with "enabled". I want to make the whole row enabled based on a boolean field (isAvailable) in the contact's record. How do I bind this?

enabled:
Bind To: Contact List Controller
Controller Key: ?
Model Key Path: isAvailable


I cannot find documentation that really explains the possible values for Controller Key which are: arrangedObjects, selection, selectionIndexes, selectionIndex, selectedObjects, sortDescriptors, filterPredicate, isEditable, canAdd, canInsert, canRemove, canSelectNext, canSelectPrevious.


My first guess is "arrangedObjects" as this is what is used to populate the columns, but this raises an exception:
_NSRaiseError
+[NSException raise:format:]
_NSHandleBindingException
_NSBoolFromValue
...


(I've tried returning the boolean value both as a BOOL and as an NSNumber*)

Am I even on the right track?

Thanks in advance,

Ryan
_______________________________________________

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


  • Prev by Date: Re: NSURLConnection vs WebKit
  • Next by Date: Re: NSProgressIndicator and _heartBeatThread
  • Previous by thread: Re: Document object is not being released
  • Next by thread: Re: Obj-C from JavaScript, Google Map event listeners in a WebView.
  • Index(es):
    • Date
    • Thread