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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:09:45+00:00 2026-05-26T15:09:45+00:00

I have this problem with a tableview in iOS5 that is giving me errors,

  • 0

I have this problem with a tableview in iOS5 that is giving me errors, note that it works well with the older sdk.
This is the relevant code:
h file
#import

@interface WordListTableViewController : UITableViewController {
  //NSMutableDictionary *words;
  //NSArray *sections;
}
@end

m file
#import “WordListTableViewController.h”
#import “DefinitionViewController.h”

@interface WordListTableViewController()
  @property (nonatomic, strong) NSMutableDictionary *words;
  @property (nonatomic, strong) NSArray *sections;
@end


@implementation WordListTableViewController

@synthesize  words, sections;
- (NSMutableDictionary *) words
{
   if(!words){
          NSURL *wordsURL = [NSURL URLWithString:@"http://localhost/Vocabulous.txt"];
          words = [NSMutableDictionary dictionaryWithContentsOfURL:wordsURL] ;
   }
   return words;
}

- (NSArray *) sections
{
    if(!sections)
    {
       sections = [[self.words allKeys] sortedArrayUsingSelector:@selector(compare:)] ;
    }
    return sections;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath     *)indexPath
{

static NSString *CellIdentifier = @"WordListTableViewCell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
//cell.textLabel.text = cell.textLabel.text = [self wordAtIndexPath:indexPath];
cell.textLabel.text = @"Test";


    return cell;
}

h File for App Delegate
#import

@interface VocabAppDelegate : UIResponder <UIApplicationDelegate>
{

}

@property (strong, nonatomic)  UIWindow *window;
@property (strong, nonatomic) UINavigationController *nav;
@end

m File for App Delegate with relevant code :
#import “VocabAppDelegate.h”
#import “WordListTableViewController.h”

@implementation VocabAppDelegate
@synthesize window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:     (NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    WordListTableViewController *wltvc = [[WordListTableViewController alloc] init];
    self.nav = [[UINavigationController alloc] initWithRootViewController: wltvc ];

    self.window.rootViewController = self.nav;
    [self.window makeKeyAndVisible];
    return YES;

}

The Error is the following: EXEC_BAD_ACCESS
It’s like it only sets the visible cells and when I start scrolling down looking for the not visible ones, it’s like they can’t be displayed.

Fina UPDATE :
Following the advise from mattyhoe, I’ve replaced the method wordAtIndexPath with a static text, and followed the other two side notes Plus the way I use the delegate and it works !!!

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-26T15:09:46+00:00Added an answer on May 26, 2026 at 3:09 pm

    Nothing looks out of place there, so it’s likely the work you’re doing inside of wordAtIndexPath. To test this theory, simply replace that line with something like this:

    cell.textLabel.text = @"Hello";
    

    As a side note, you do not need to declare ivars. Simply use @propertys.
    Also, you likely want to set the accessory type when you’re allocing a new cell and not every time this method is called, so moving it inside the conditional makes sense.

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

Sidebar

Related Questions

I have this problem I've been sitting with. My tableView that I put inside
I have this problem that my sites uses alot of ajax and when a
I have this problem decomposing a relation schema into a set of schemas that
I have a problem loading different nib files in one tableView. I saw this
I have a custom UIbutton in every cell of my tableview. This UIbutton works
Ha ii, i have this code in - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { _lblmainChapterlbl.text=[NSString
I have this code, which resizes the tableview when I click a textfield inside
I have this problem that when I setframe of the parent view of the
I have this little problem I couldn't find in Google: UITableView works fine until
I have this problem I'm hoping someone knows the answer to. I have an

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.