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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:18:28+00:00 2026-05-17T20:18:28+00:00

I have this little problem I couldn’t find in Google: UITableView works fine until

  • 0

I have this little problem I couldn’t find in Google:
UITableView works fine until I start scrolling.

Error Message: `-[NSCFString objectAtIndex:]: unrecognized selector  sent to instance 0x5f24870 `

Method:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    static NSString *MyIdentifier = @"MyIdentifier";    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];     
    if (cell == nil)
    { 
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease];
    }   
    // Set up the cell 
    int storyIndex = [indexPath indexAtPosition: [indexPath length]-1];     
    //populate cell
    cell.textLabel.text = [[myArray objectAtIndex: storyIndex] objectForKey: @"subject"]; 
    return cell;    
}

Just guessed that was the “problem”-method… if you need more infos: please tell me 🙂
thanks for all your help!

EDIT:
myArray is just the normal NSArray *myArray
It’s a sorted Array ->

   NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"lesson" ascending:YES];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
myArray = [resultArray sortedArrayUsingDescriptors:sortDescriptors];

resultArray (NSMutableArray) is the Result of an XML-Parser.. hope you can see my problem..

  • 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-17T20:18:29+00:00Added an answer on May 17, 2026 at 8:18 pm

    It means that you’re sending an objectAtIndex: messages to an object of type NSString (or possibly CFString). Of course you’re expecting myArray to be an array and not a string.

    What probably happened is that your array is being released (almost certainly autoreleased) too early and that by the time the method above is called the memory that was being pointed at by myArray now holds a string.

    In response to your edit…

    This line:

    myArray = [resultArray sortedArrayUsingDescriptors:sortDescriptors];
    

    …is incorrect. The value is autoreleased. You need to retain it:

    myArray = [[resultArray sortedArrayUsingDescriptors:sortDescriptors] retain];
    

    Remember to release it before you close the view!

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

Sidebar

Related Questions

I have this little problem, that I cannot figure out which arguments to pass
I have this little problem. My client wanted two distinct swf on a web
I'm having a trouble with this little problem. Let's say, I have an array,
I have a little problem. This is my code: stackPanelShapesContainer = new StackPanel(); InitializeStackPanle();
Alright, this problem is a little complicated, so bear with me. I have a
I have a little problem understanding XMLHttpRequest 's handlers. The specification says this about
i have this little problem, i use the Application settings in VS 2010 to
I have this little rake task: namespace :db do namespace :test do task :reset
I have this little question that's been on my mind for a while now.
I have this little NetStream movie (which I'm not allowed to show, sorry) set

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.