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 6027883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:39:26+00:00 2026-05-23T04:39:26+00:00

I have this error, when I am trying to pass a uitextfeild value from

  • 0

I have this error, when I am trying to pass a uitextfeild value from my tableView:didSelectRowAtIndexPath: method in my uitableview over to my nsobject class however when I click the uitableviewcell that I have coded to pass the uitextfield value I receive the error listed below.

//DBAccess.h

    @interface DBAccess : NSObject {

        NSString *receiveCodeText;

    }

    @property (nonatomic, retain) IBOutlet NSString *receiveCodeText;

- (NSMutableArray *) getAllMakes;
    - (void) setPassCode:(NSString *)theCode;

//DBAccess.m

//...
//Need to set my string here..
- (void)setPassCode:(NSString *)theCode{
    receiveCodeText = theCode;
}
//...
- (NSMutableArray *)getAllMakes{
//...
const char *value = [receiveCodeText cStringUsingEncoding:NSUTF8StringEncoding]; //reciveCodeText is set in RootViewController and passed to value here
    [receiveCodeText release];
    sqlite3_bind_text(statement, 1, value, -1, SQLITE_TRANSIENT);

//....
}

//viewController.m

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    searchTableViewController *searchTable = [[searchTableViewController alloc] initWithNibName:@"searchTableViewController" bundle:nil];

    switch (indexPath.row) {
        case 1: {
            searchTable.editedFieldName = @"Make";
            //Pass code number over to DBAccess class
            [DBAccess setPassCode:codeText.text];
        } break;
        case 2: {
            searchTable.editedFieldName = @"Mod";
        } break;
        case 3: {
            searchTable.editedFieldName = @"Method";
        } break;
    }

    [self.navigationController pushViewController:searchTable animated:YES];
    [searchTable release];
}

And this is the error I am getting.

> 2011-06-13 13:05:33.433
> Code1.6[1318:207] +[DBAccess
> setPassCode:]: unrecognized selector
> sent to class 0x51e8 2011-06-13
> 13:05:33.477 Code1.6[1318:207] ***
> Terminating app due to uncaught
> exception
> 'NSInvalidArgumentException', reason:
> '+[DBAccess setPassCode:]:
> unrecognized selector sent to class
> 0x51e8'
> *** Call stack at first throw: (  0   CoreFoundation                     
> 0x00e45be9 __exceptionPreprocess + 185
>   1   libobjc.A.dylib                  
> 0x00f9a5c2 objc_exception_throw + 47
>   2   CoreFoundation                   
> 0x00e477bb +[NSObject(NSObject)
> doesNotRecognizeSelector:] + 187  3  
> CoreFoundation                     
> 0x00db7366 ___forwarding___ + 966     4  
> CoreFoundation                     
> 0x00db6f22 _CF_forwarding_prep_0 + 50
>   5   Code1.6                       
> 0x000028ff -[RootViewController
> tableView:didSelectRowAtIndexPath:] +
> 253   6   UIKit                        
> 0x00331794 -[UITableView
> _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:]
> + 1140    7   UIKit                               0x00327d50 -[UITableView
> _userSelectRowAtPendingSelectionIndexPath:]
> + 219     8   Foundation                          0x0003a7f6 __NSFireDelayedPerform +
> 441   9   CoreFoundation               
> 0x00e26fe3

> __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
> + 19  10  CoreFoundation                      0x00e28594 __CFRunLoopDoTimer + 1220
>   11  CoreFoundation                   
> 0x00d84cc9 __CFRunLoopRun + 1817  12 
> CoreFoundation                     
> 0x00d84240 CFRunLoopRunSpecific + 208
>   13  CoreFoundation                   
> 0x00d84161 CFRunLoopRunInMode + 97    14
> GraphicsServices                   
> 0x016e7268 GSEventRunModal + 217  15 
> GraphicsServices                   
> 0x016e732d GSEventRun + 115   16  UIKit
> 0x002ca42e UIApplicationMain + 1160
>   17  Code1.6                       
> 0x0000230c main + 102     18  Code1.6    
> 0x0000229d start + 53 ) terminate
> called after throwing an instance of
> 'NSException'
  • 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-23T04:39:27+00:00Added an answer on May 23, 2026 at 4:39 am

    setPassCode seems to be a class instance method and not a static method, yet you are trying to access it as a static method, you must declare yur method like so in order for it to be static

    +(void)setPassCode....
    

    Your program crashes because you are calling the method on the class itself instead of on an instance of the class..
    Hope this helps

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

Sidebar

Related Questions

I have been trying to get around this error for a day now and
I'm trying to pass a struct from one object to another. I have the
I am trying to pass a uitextfield string from a view controller over to
I am getting this error when trying to pass my object to the view.
I have got this error when using Enterprise Library 3.1 May 2007 version. We
I get this error:- You have an error in your SQL syntax; check the
NHibernate is driving me 'Nuts'!!! I have the following mapping. Which returns this error
I have limited experience with .net. My app throws an error this.dateTimeFormat is undefined
I have a list of error codes I need to reference, kinda like this:
I've tried this both with and without the 'ExceptionType' parameter. I have an Error.aspx

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.