• 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
Array operators (was: Custom canRemove binding)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Array operators (was: Custom canRemove binding)


  • Subject: Array operators (was: Custom canRemove binding)
  • From: Allan Odgaard <email@hidden>
  • Date: Thu, 6 May 2004 01:56:15 +0200

On 5. May 2004, at 21:56, Scott Anguish wrote:

[...] bind enabled2 to theArrayController.content.count

Which should probably be: theArrayController.arrangedObjects.@count

Speaking of which (array operators), are these supposed to be KVO compliant? cause it would seem that they are not, except when the key path involves an NSArrayController.

E.g. this works:
[arrayController addObserver:self
forKeyPath:@"arrangedObjects.@count" options:0 context:NULL];

Where this gives a run-time error:
id obj = [arrayController arrangedObjects];
[obj addObserver:self forKeyPath:@"@count" options:0 context:NULL];

Which imply that binding to [File's Owner].someArray.@count will also fail, unless File's Owner (also?) overload addObserver:... -- I hope I've overlooked something obvious, cause this does not make a lot of sense to me... ;)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Array operators (was: Custom canRemove binding)
      • From: Scott Anguish <email@hidden>
References: 
 >Custom canRemove binding (From: ian <email@hidden>)
 >Re: Custom canRemove binding (From: Allan Odgaard <email@hidden>)
 >Re: Custom canRemove binding (From: ian <email@hidden>)
 >Re: Custom canRemove binding (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: Another NSText... problem: a sticky attribute
  • Next by Date: A couple of NSFont questions
  • Previous by thread: Re: Custom canRemove binding
  • Next by thread: Re: Array operators (was: Custom canRemove binding)
  • Index(es):
    • Date
    • Thread