• 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
KeyPathsForValuesAffectingValueForKey confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KeyPathsForValuesAffectingValueForKey confusion


  • Subject: KeyPathsForValuesAffectingValueForKey confusion
  • From: Trygve Inda <email@hidden>
  • Date: Mon, 10 May 2010 15:12:50 +0000
  • Thread-topic: KeyPathsForValuesAffectingValueForKey confusion

I have an NSArrayController containing items and a text field in a window
which is bound to a custom class "MyController" via model key path:
filteredResultsString


-(NSString *)filteredResultsString
{
return ([[NSNumber numberWithInt:[[itemsController arrangedObjects] count]]
stringValue]);
}


This works, except when the contents of the NSArrayController change it does
not update.

If I change the binding to controller key arrngedObjects model key path
@count it works perfectly, but I want to use my custom method to customize
the output in a way that a Display Pattern can't.

How do I get this to work?


_______________________________________________

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:
    • Re: KeyPathsForValuesAffectingValueForKey confusion
      • From: Keary Suska <email@hidden>
  • Prev by Date: Overriding text size in NSTextStorage
  • Next by Date: Re: KeyPathsForValuesAffectingValueForKey confusion
  • Previous by thread: Re: Overriding text size in NSTextStorage
  • Next by thread: Re: KeyPathsForValuesAffectingValueForKey confusion
  • Index(es):
    • Date
    • Thread