• 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: Weird problem with Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird problem with Core Data


  • Subject: Re: Weird problem with Core Data
  • From: email@hidden
  • Date: Fri, 20 Jan 2006 09:31:15 -0800

Probably a bad binding. - member is a method for NSSet, but its being called to NSArray.

Don Willems wrote:

Hi.

I'm working on an RSS reader where the channel information and items are saved using Core Data.
Each entity in de datamodel has a custom implementation class. So for entity Channel I have class NEWSChannel.


Two days ago I started getting error messages, and app crashes.
The errors I get: -[NSCFArray member:]: selector not recognized [self = 0x3f0e20]
Probably best thing to do is find out is "po self" in the deugger or the address when the exception occurs, its maybe a table column or something

Seems straightforward except that I never use the message member in my code.
I found out that the error occurs when I send the message addNewsItemsObject: to a NEWSChannel object.



- (void)addNewsItemsObject:(NEWSItem *)value
{
NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
[self willChangeValueForKey:@"newsItems" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
[[self primitiveValueForKey: @"newsItems"] addObject: value];
[self didChangeValueForKey:@"newsItems" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
[changedObjects release];
}


The error happens at the second line in this method (willChangeValueForKey:withSetMutation:usingObjects:).
Then probably a bound object is getting told its value will change, so it grabs it, but the binding is wrong so it cant....

This method has been automatically generated by XCode using the contextual menu on the newsItems relationship in the Channel entity (in the data model tool).

Stupid thing is that it worked a week ago. I've been working on the GUI but not on the data part of the application, so I have no idea what went wrong.

Any idea what is going on?

Thank you,
Don
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Weird problem with Core Data (From: Don Willems <email@hidden>)

  • Prev by Date: Re: Some confusion on memory management
  • Next by Date: Re: NSApplication terminate: behavior
  • Previous by thread: Weird problem with Core Data
  • Next by thread: Re: Weird problem with Core Data
  • Index(es):
    • Date
    • Thread