• 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
NSTableColumn "enabled" binding on 10.3.9
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableColumn "enabled" binding on 10.3.9


  • Subject: NSTableColumn "enabled" binding on 10.3.9
  • From: glenn andreas <email@hidden>
  • Date: Fri, 12 Jan 2007 10:02:11 -0600

I've got a table that I want to have some of the rows of one of the columns disabled (e.g., row contains a "locked" flag, as well as a value, and I want the value to be disabled when the thing is locked). So I bind the table column's "enabled" based on appropriate key (NSNegatedBoolean[array controller's arrangedObjects.locked]), and everything works great.

But only on 10.4.x

On 10.3.9, I get an error:

[<NSTableColumn> valueForUndefinedKey:]: this class is not key value coding-compliant for the key enabled.

According to the documentation <http://developer.apple.com/ documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/ NSTableColumn.html#//apple_ref/doc/uid/NSTableColumn- DontLinkElementID_731>:

enabled
A multiple-value binding that determines if the NSTableColumn is enabled in the user interface.


When enabled is bound, a new binding, enabled2, is exposed and can be bound. Binding to enabled2 causes enabled3 to be exposed, and so on.

The NSTableColumn is enabled if a logical AND operation on all the enabled bindings results in a Boolean value of YES.

Availability:
Available in Mac OS X v10.3 and later.

So it should work fine, but it doesn't.

Short of disabling this feature, any suggestions on how to work around this? I've tried to add, via a category (in a bundle that gets loaded only on 10.3 systems) NSTableColumn's "enabled" and "setEnabled" accessors (by forwarding them onto the dataCell or by just doing nothing), but this results in a different error ("NSCFArray doesn't respond to boolValue").

Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________

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: sleep() stops working when enabling pthread_cancel()
  • Next by Date: Re: int and short int on intel
  • Previous by thread: DO bycopy qualifier and Key-Value Coding
  • Next by thread: nstask with admin privs
  • Index(es):
    • Date
    • Thread