Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7447799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:48:45+00:00 2026-05-29T12:48:45+00:00

I have some entities in core data, and they are all sub classes of

  • 0

I have some entities in core data, and they are all sub classes of a super class which has a NSDate attribute,

and all others works well when I save them,

but one of them would seemingly probabilisticly crash when I save it,

and I found the reason is about its NSDate attribute inherited from its super Class,

when I set the date value for the NSDate attribute, it crashes and log out this:

2012-02-10 00:24:34.474 EasyWallet[37772:707] -[__NSDate managedObjectContext]: unrecognized 
selector sent to instance 0xdc54c30
2012-02-10 00:24:34.483 EasyWallet[37772:707] *** Terminating app due to uncaught exception 
'NSInvalidArgumentException', reason: '-[__NSDate managedObjectContext]: unrecognized 
selector sent to instance 0xdc54c30'
*** First throw call stack:
(0x344268bf 0x346761e5 0x34429acb 0x34428945 0x34383680 0x32f8811b 0x32f8904b 0x32f8aeb5   
0x32f83161 0x32f7e8cf 0x3c507 0x34380435 0x377ea9eb 0x377ea9a7 0x377ea985 0x377ea6f5 
0x377eb02d 0x377e950f 0x377e8f01 0x377cf4ed 0x377ced2d 0x30c01df3 0x343fa553 0x343fa4f5 
0x343f9343 0x3437c4dd 0x3437c3a5 0x30c00fcd 0x377fd743 0x29b1 0x2970)
terminate called throwing an exception(gdb) 

and here is my code for saving these attributes

... // get keys
 self.rowKeys = [NSMutableArray arrayWithObjects:@"personName",@"amount",@"incomingAccount",
                    @"date",@"returnDate",@"isReturned",@"memo",nil];
... // saving
for (int i = 0; i < [self.rowKeys count]; i++) {
    NSLog(@"%d: %@",i,[rowValues valueForKey:key(i)]);
    [newMo setValue:[self.rowValues valueForKey:key(i)] forKey:key(i)];
}

the key(i) here is a macro define:

#define key(X) [rowKeys objectAtIndex:(X)]

and the date was printed out like this, with no surprise.

2012-02-10 16:00:00 +0000

when it comes to save “date” attribute, it crashes, but fewer times it just passed.

I got that date from a UIDatePicker, and I’ve checked my codes finding nothing wrong I think.

Really need some help!

Thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:49:02+00:00Added an answer on May 29, 2026 at 12:49 pm

    I’ve fixed it.

    The problem is that I made a silly mistake of sending some NSDate method to a non-NSDate ojbect, in some very secret place.

    Just pay attention to your codes, especially confusing parts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some ASP.NET web services which all share a common helper class they
I have 3 entities in my core data app: Criteria--->>Rank(has 1 attribute:criteriaRank)<<---Option Let's a
Here I have some entities in core data, for example, Account, and I wish
I have a core data model with some entities set up. I have set
I have a Core Data stack in which there are two entities: 'Client' and
I have a Core Data model with two entities: A and B. A has
In CoreData, I have the data graph with some entities, and each object is
I've got some entities which have decimal properties on them. These entities' properties are
In one of my projects, I have some classes that represent entities that cannot
Imagine you have an entity that has some relations with other entities and you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.