• 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
Re: NSArrayController subclass computed property not being updated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController subclass computed property not being updated


  • Subject: Re: NSArrayController subclass computed property not being updated
  • From: Jim Correia <email@hidden>
  • Date: Wed, 29 Jul 2009 14:24:39 -0400

On Jul 29, 2009, at 1:09 AM, Alexander Heinz wrote:

I've got an NSArrayController subclass with a computed property:

@property (readonly) BOOL canRemoveSelection;

(This basically adds some application-specific checks to the canRemove: property, so that I can bind a "remove" button in Interface Builder.)

I want the property to be recomputed every time the "selectionIndex" or "selectionIndexes" of the array controller change, so, in my ".m" file, I have:

+ (NSSet*)keyPathsForValuesAffectingCanRemoveSelection
{
return [NSSet setWithObjects:@"selectionIndex", @"selectionIndexes", nil];
}

[...]

Does anyone see anything immediately wrong here?

My previous post explains why this doesn't work:

	http://lists.apple.com/archives/Cocoa-dev/2009/Apr/msg01683.html

Jim

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Follow-Ups:
    • [SOLVED] NSArrayController subclass computed property not being updated
      • From: Alexander Heinz <email@hidden>
References: 
 >NSArrayController subclass computed property not being updated (From: Alexander Heinz <email@hidden>)

  • Prev by Date: Re: NSArrayController subclass computed property not being updated
  • Next by Date: Re: Cahnging bgColor of a UIView not working.
  • Previous by thread: Re: NSArrayController subclass computed property not being updated
  • Next by thread: [SOLVED] NSArrayController subclass computed property not being updated
  • Index(es):
    • Date
    • Thread