• 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: Does willChange:valuesAtIndexes:forKey: work correctly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does willChange:valuesAtIndexes:forKey: work correctly?


  • Subject: Re: Does willChange:valuesAtIndexes:forKey: work correctly?
  • From: Scott Stevenson <email@hidden>
  • Date: Fri, 16 Mar 2007 01:21:28 -0700


On Mar 15, 2007, at 10:00 PM, Steve Weller wrote:

I have the array controller bound to my class and have methods objectInImageTableDataAtIndex: and countOfImageTableData: so I can provide the data it needs. This all works. The controller happily fills my table.

I feel like I'd need to see this in person to really get what's going on for sure, but a few suggestions:



1. Implement all of the indexed accessors and use those. Specifically:

	-replaceObjectInImageTableDataAtIndex:withObject:

You can use this directly inside your loop.

<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/Concepts/AccessorConventions.html>


2. You also might try:

	id arrayProxy = [self mutableArrayValueForKey:@"imageTableData"];

Which gives you back a proxy object which acts like a mutable array. Changes to that proxy object are picked up by the array controller directly.


3. The combination of 1 and 2. Implement all of the index accessors, then use -mutableArrayValueForKey: to make changes.



Let use know what you find.

    - Scott
_______________________________________________

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


  • Follow-Ups:
    • Re: Does willChange:valuesAtIndexes:forKey: work correctly?
      • From: Steve Weller <email@hidden>
    • Re: Does willChange:valuesAtIndexes:forKey: work correctly?
      • From: Steve Weller <email@hidden>
References: 
 >Does willChange:valuesAtIndexes:forKey: work correctly? (From: Steve Weller <email@hidden>)

  • Prev by Date: Re: Core Data & threads [re: Ping: Look for hints for "nested transaction" problem with Core Data]
  • Next by Date: Re: Core Data & threads [re: Ping: Look for hints for "nested transaction" problem with Core Data]
  • Previous by thread: Does willChange:valuesAtIndexes:forKey: work correctly?
  • Next by thread: Re: Does willChange:valuesAtIndexes:forKey: work correctly?
  • Index(es):
    • Date
    • Thread