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

  • SEARCH
  • Home
  • 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 6782913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:48:04+00:00 2026-05-26T16:48:04+00:00

I have been looking at this for hours but can’t find out what’s wrong.

  • 0

I have been looking at this for hours but can’t find out what’s wrong.
I am trying to update objects via core data once a button is pressed.

Apple documentation states that: This method raises an NSInvalidArgumentException if aSelector is NULL.

I don’t see how aSelector is Null, it would be appreciated if someone could point out what I am missing.

-(void)updatePaymentFields:(NSString*) aValue {
NSLog(@"I'm inside Update Payment Fields");
[self setValue:aValue forKey:@"amountPaid"];
}

This is the button pressed method which should call the above updatePaymentFields: method

- (IBAction)saleCompleteButtonTapped:(id)sender {
Invoice_MarketAppDelegate* delegate = [[UIApplication sharedApplication] delegate];

NSManagedObjectContext* managedObjectContext = delegate.managedObjectContext;

NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Invoice"     inManagedObjectContext:managedObjectContext];
[fetchRequest setEntity:entity];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"invoiceNumber == %@", invoiceNumberLabel.text];
NSLog(@"predicate is: %@",predicate);
[fetchRequest setPredicate:predicate];

NSLog(@"I'm inside saleCompleteButtonTapped");
NSError* error;
NSMutableArray *mutableFetchResults = [[[managedObjectContext executeFetchRequest:fetchRequest error:&error]mutableCopy ]autorelease];
NSLog(@"array:%@",mutableFetchResults);
NSLog(@"%@",amountPaidStr);
[mutableFetchResults makeObjectsPerformSelector:@selector(updatePaymentFields:) withObject:amountPaidStr];
}

This is the Log output

2011-11-08 17:14:45.708 Market[521:fb03] I'm inside saleCompleteButtonTapped
2011-11-08 17:14:45.867 Market[521:fb03] array:(
"<Invoice: 0x8142340> (entity: Invoice; id: 0x8140f90 <x-coredata://AF2BBB5C-4135-45EB-A421-5036AE02D2A0/Invoice/p1> ; data: {\n    GSTAmount = 1;\n    amountPaid = nil;\n    cardID = 0;\n    customer = \"\";\n    date = \"07/11/2011\";\n    incTaxPrice = 11;\n    incTaxTotal = 110;\n    invoiceNumber = a1;\n    itemCode = 1035;\n    paymentMethod = nil;\n    price = \"10.00\";\n    quantity = \"10.00\";\n    saleStatus = I;\n    taxCode = GST;\n    timeStamp = \"2011-11-06 17:22:04 +0000\";\n    total = 100;\n})"
)
2011-11-08 17:14:45.869 Market[521:fb03] 110.00
2011-11-08 17:14:45.870 Market[521:fb03] -[Invoice updatePaymentFields:]: unrecognized selector sent to instance 0x8142340
2011-11-08 17:14:45.894 Market[521:fb03] *** Terminating app due to uncaught exception   'NSInvalidArgumentException', reason: '-[Invoice updatePaymentFields:]: unrecognized selector   sent to instance 0x8142340'
*** First throw call stack:
 (0x1549052 0x1afdd0a 0x154aced 0x14aff00 0x14afce2 0x154ae72 0x14a6c78 0xa980 0xaa49  0x154aec9 0x4995c2 0x49955a 0x53eb76 0x53f03f 0x53e2fe 0x4bea30 0x4bec56 0x4a5384 0x498aa9 0x2436fa9 0x151d1c5 0x1482022 0x148090a 0x147fdb4 0x147fccb 0x2435879 0x243593e 0x496a9b 0x1d6d 0x1ce5)

I suspect that I should have the code inside the method

 - (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(id)anObject {
 NSLog(@"I'm inside the makeObjectsPerformSelector");
 }

But I then don’t know how to call this inside my buttonPressedMethod, I can’t simply do

[self makeObjectsPerformSelector:withObject:];

Any Help would be appreciated. Thanks

  • 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-26T16:48:04+00:00Added an answer on May 26, 2026 at 4:48 pm

    It looks like your Invoice class doesn’t have an instance method updatePaymentFields:. Are you sure you put that method in the right class?

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

Sidebar

Related Questions

I've been looking for a solution to this for hours, but I can't find
I have been looking around the web for this but cannot really find a
I have been looking everywhere but could not find a tutorial for this. I
I am learning OpenXML. I have been looking for hours trying to find how
I have been looking into this for some hours now and can't figure it
Hi I have been looking for hours but cannot find the API call that
I have been looking for an answer to this on Stack Overflow, but I
I have been looking for some time for this and I can't seem to
I have been looking for an answer to this and could not find it
I have been looking over the internet for a while about this, but it

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.