• 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 "auto rearrange content"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nsarraycontroller "auto rearrange content"


  • Subject: Re: nsarraycontroller "auto rearrange content"
  • From: Chris Anderson <email@hidden>
  • Date: Wed, 04 Feb 2009 20:13:16 -0800

I was able to work around it by unchecking "auto rearrange content" and calling rearrageObjects directly. But I'd still like to know if anyone knows why this happens or if it's a bug.

C.

On 3-Feb-09, at 1:40 PM, Chris Anderson wrote:

Hello,

Been bashing my head on this one. Did lots of googling and apple docs reading but haven't found an answer so any help would be appreciated.

As an example I have 2 entities in a Core Data app...

Project
Project.name
Project.startDate

Type
Type.name

...add a one-to-one relationship...

Project.type --> Type

When the application starts I auto populate Type with a bunch of entries from info.plist in App Delegate and set a sort descriptor on the Projects array controller based on "startDate".

I set up a table with the following columns...

Name --> value --> Project.arrangedObjects.name

Date --> value --> Project.arrangedObjects.startDate

Type --> value --> Project.arrangedObjects.type.name

Everything works great so far....add/edit/remove/sort...great.

I want to now be able to have the table re-sorted on-the-fly after the startDate has been changed on any of the objects in the table. I turn on "Auto Rearrange Content" on the Projects array controller in IB and that seems to work in the app. If I restart the app I get this in the log...

"Cannot remove an observer <NSTableBinder 0x191940> for the key path "type.name" from <NSManagedObject 0x1da520> because it is not registered as an observer"

...and trying to add/remove any objects results in more errors like above. I played around with this and it only seems to happen when there's a column bound through a relationship. If I remove this binding, essentially removing the "type" column on the example table above, it works fine.

Has anyone run into this and how does one deal with it?

Thanks!

Chris
_______________________________________________

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

_______________________________________________

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


References: 
 >nsarraycontroller "auto rearrange content" (From: Chris Anderson <email@hidden>)

  • Prev by Date: RE: why popupbuttoncell always select second item in tableview ?
  • Next by Date: Memory management question in Objective-C 2.0 @property notation
  • Previous by thread: nsarraycontroller "auto rearrange content"
  • Next by thread: Re: Analyzing Core Data Conflict List
  • Index(es):
    • Date
    • Thread