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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:58:16+00:00 2026-05-22T16:58:16+00:00

There are no bugs in the code but my Dictionary doesnt get loaded CODE:

  • 0

There are no bugs in the code but my Dictionary doesnt get loaded

CODE:

//
//  SectionsViewController.m
//  Sections
//
//  Created by Kunwar Handa on 25/05/11.
//  Copyright 2011 Fortune4  Technologies. All rights reserved.
//

#import "SectionsViewController.h"

@implementation SectionsViewController
@synthesize names;
@synthesize keys;

#pragma mark -
#pragma mark UIViewController Methods

-(void)viewDidLoad{


    NSString *path = [[NSBundle mainBundle] pathForResource:@"sortednames" ofType:@"plist"];
    NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
    self.names= dict;
    [dict release];

    NSArray *array = [[names allKeys] sortedArrayUsingSelector:@selector(compare:)];
    self.keys= array;

}



/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/


/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/



// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}


- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [names release];
    [keys release];
    [super dealloc];
}

#pragma mark -
#pragma mark Table View Data Source Methods

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

    return [keys count];

}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

{
    NSString *key = [keys objectAtIndex:section];
    NSArray *nameSection = [names objectForKey:key];
    return [nameSection count];
}

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

    NSUInteger section = [indexPath section];
    NSUInteger row = [indexPath row];

    NSString *key = [keys objectAtIndex:section];
    NSArray *nameSection = [names objectForKey:key];

    static NSString *SectionTableIdentifier = @"SectionTableIdentifier";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SectionTableIdentifier];

    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:SectionTableIdentifier] autorelease];
    }

                cell.text = [nameSection objectAtIndex:row];
                return cell;
}

-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{

    NSString *key = [keys objectAtIndex:section];
    return key;

}
@end




**LOG:**



Build Sections of project Sections with configuration Debug

ProcessInfoPlistFile /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app/Info.plist Sections-Info.plist
cd /Users/kunwarhanda/Documents/Sections
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-infoPlistUtility Sections-Info.plist -genpkginfo /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app/Info.plist

CompileXIB /Users/kunwarhanda/Documents/Sections/MainWindow.xib
cd /Users/kunwarhanda/Documents/Sections
setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.2
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app/MainWindow.nib /Users/kunwarhanda/Documents/Sections/MainWindow.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk

CompileXIB /Users/kunwarhanda/Documents/Sections/SectionsViewController.xib
cd /Users/kunwarhanda/Documents/Sections
setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.2
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app/SectionsViewController.nib /Users/kunwarhanda/Documents/Sections/SectionsViewController.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk

ProcessPCH /var/folders/6o/6oRlqcHSG3i+gabLJ+MCV++++TM/-Caches-/com.apple.Xcode.502/SharedPrecompiledHeaders/Sections_Prefix-gyjbjzxosthibsbszggxsbxqehxr/Sections_Prefix.pch.gch Sections_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2
cd /Users/kunwarhanda/Documents/Sections
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-generated-files.hmap -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-own-target-headers.hmap -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-all-target-headers.hmap -iquote /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-project-headers.hmap -F/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator -I/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/include -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/DerivedSources/i386 -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/DerivedSources -c /Users/kunwarhanda/Documents/Sections/Sections_Prefix.pch -o /var/folders/6o/6oRlqcHSG3i+gabLJ+MCV++++TM/-Caches-/com.apple.Xcode.502/SharedPrecompiledHeaders/Sections_Prefix-gyjbjzxosthibsbszggxsbxqehxr/Sections_Prefix.pch.gch

CompileC build/Sections.build/Debug-iphonesimulator/Sections.build/Objects-normal/i386/main.o /Users/kunwarhanda/Documents/Sections/main.m normal i386 objective-c com.apple.compilers.gcc.4_2
cd /Users/kunwarhanda/Documents/Sections
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-generated-files.hmap -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-own-target-headers.hmap -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-all-target-headers.hmap -iquote /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-project-headers.hmap -F/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator -I/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/include -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/DerivedSources/i386 -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/DerivedSources -include /var/folders/6o/6oRlqcHSG3i+gabLJ+MCV++++TM/-Caches-/com.apple.Xcode.502/SharedPrecompiledHeaders/Sections_Prefix-gyjbjzxosthibsbszggxsbxqehxr/Sections_Prefix.pch -c /Users/kunwarhanda/Documents/Sections/main.m -o /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Objects-normal/i386/main.o

CompileC build/Sections.build/Debug-iphonesimulator/Sections.build/Objects-normal/i386/SectionsAppDelegate.o /Users/kunwarhanda/Documents/Sections/Classes/SectionsAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2
cd /Users/kunwarhanda/Documents/Sections
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-generated-files.hmap -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-own-target-headers.hmap -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-all-target-headers.hmap -iquote /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-project-headers.hmap -F/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator -I/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/include -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/DerivedSources/i386 -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/DerivedSources -include /var/folders/6o/6oRlqcHSG3i+gabLJ+MCV++++TM/-Caches-/com.apple.Xcode.502/SharedPrecompiledHeaders/Sections_Prefix-gyjbjzxosthibsbszggxsbxqehxr/Sections_Prefix.pch -c /Users/kunwarhanda/Documents/Sections/Classes/SectionsAppDelegate.m -o /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Objects-normal/i386/SectionsAppDelegate.o

CompileC build/Sections.build/Debug-iphonesimulator/Sections.build/Objects-normal/i386/SectionsViewController.o Classes/SectionsViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2
cd /Users/kunwarhanda/Documents/Sections
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-generated-files.hmap -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-own-target-headers.hmap -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-all-target-headers.hmap -iquote /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Sections-project-headers.hmap -F/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator -I/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/include -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/DerivedSources/i386 -I/Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/DerivedSources -include /var/folders/6o/6oRlqcHSG3i+gabLJ+MCV++++TM/-Caches-/com.apple.Xcode.502/SharedPrecompiledHeaders/Sections_Prefix-gyjbjzxosthibsbszggxsbxqehxr/Sections_Prefix.pch -c /Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m -o /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Objects-normal/i386/SectionsViewController.o

/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m: In function '-[SectionsViewController viewDidLoad]':
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m:27: warning: incompatible Objective-C types 'struct NSArray *', expected 'struct NSDictionary *' when passing argument 1 of 'setKeys:' from distinct Objective-C type
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m: In function '-[SectionsViewController tableView:numberOfRowsInSection:]':
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m:99: warning: 'NSDictionary' may not respond to '-objectAtIndex:'
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m:99: warning: (Messages without a matching method signature
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m:99: warning: will be assumed to return 'id' and accept
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m:99: warning: '...' as arguments.)
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m: In function '-[SectionsViewController tableView:cellForRowAtIndexPath:]':
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m:110: warning: 'NSDictionary' may not respond to '-objectAtIndex:'
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m:120: warning: 'setText:' is deprecated (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITableViewCell.h:211)
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m: In function '-[SectionsViewController tableView:titleForHeaderInSection:]':
/Users/kunwarhanda/Documents/Sections/Classes/SectionsViewController.m:127: warning: 'NSDictionary' may not respond to '-objectAtIndex:'

Ld build/Debug-iphonesimulator/Sections.app/Sections normal i386
cd /Users/kunwarhanda/Documents/Sections
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -L/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator -F/Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator -filelist /Users/kunwarhanda/Documents/Sections/build/Sections.build/Debug-iphonesimulator/Sections.build/Objects-normal/i386/Sections.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app/Sections

GenerateDSYMFile build/Debug-iphonesimulator/Sections.app.dSYM build/Debug-iphonesimulator/Sections.app/Sections
cd /Users/kunwarhanda/Documents/Sections
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/usr/bin/dsymutil /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app/Sections -o /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app.dSYM

Touch build/Debug-iphonesimulator/Sections.app
cd /Users/kunwarhanda/Documents/Sections
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/touch -c /Users/kunwarhanda/Documents/Sections/build/Debug-iphonesimulator/Sections.app
  • 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-22T16:58:17+00:00Added an answer on May 22, 2026 at 4:58 pm

    it’s true – ‘NSDictionary’ does not respond to ‘-objectAtIndex:’

    the compiler points out the source line of the problem, for example:
    SectionsViewController.m:99

    and xcode will probably highlight it for you too.

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

Sidebar

Related Questions

During software development, there may be bugs in the codebase which are known issues.
There are a few ways to get class-like behavior in javascript, the most common
This is probably a noob question that I will get slated for but here
Is there a method for tracking or measuring the cause of bugs which won't
I had to clean up code for an online college application. There's nothing particularly
Note: my code is written in flash but this is a SVN-related issue and
There is a bug in Java 6u13 and 6u14. https://bugs.java.com/bugdatabase/view_bug?bug_id=6835450 Simply put, the following
i found this code online and im trying to compile it, but gcc keeps
When I run my code through the version 252 checker binary, there are no
I know there are ways, but is there actually a good way? At the

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.