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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:08:39+00:00 2026-05-15T20:08:39+00:00

I am working with a UITableViewController. The method that fails is: – (void) testLoc

  • 0

I am working with a UITableViewController. The method that fails is:

- (void) testLoc {
    self.dictionary = [self.delegate getLocationsWithLatitude:@"0.0" longitude:@"0.0"]; //HERE
    [self setUpTableArray:dictionary]; 
}

Test results have shown that the exception is thrown in the first line of testLoc.

- (NSDictionary *) getLocationsWithLatitude:(NSString *)latitude longitude:(NSString *)longitude;

All I do in the above method is make an HTTP request and return an NSDictionary.

Below is my viewDidLoad (the first method call, which works) for the UITableViewController:

- (void)viewDidLoad {
    self.delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    [self testLoc];
    [super viewDidLoad];
}

And here is my viewWillAppear, which I get “unrecognized selector” from:

- (void)viewWillAppear:(BOOL)animated {
    self.delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    [self testLoc];
    [super viewWillAppear:animated];
}

Here is the error that I am getting:

-[NSCFString key]: unrecognized selector sent to instance 0x141770

The reason I am doing this is because I have a table view that I want to update every time I tab back to it with a tab bar.

This is for the first real app that I am building, and I would really appreciate any kind of insight. Thanks!!

UPDATE

Here is getLocationsWithLatitude:

- (NSDictionary *) getLocationsWithLatitude:(NSString *)latitude longitude:(NSString *)longitude {
OAMutableURLRequest *locationsRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://somerequesturl"] 
                                                                        consumer:self.globals.consumer 
                                                                           token:self.globals.requestToken 
                                                                           realm:nil signatureProvider:nil];
[locationsRequest setHTTPMethod:@"GET"];

[locationsRequest setParameters:[NSArray arrayWithObjects:
                                 [OARequestParameter requestParameter:@"geolat" value:latitude],
                                 [OARequestParameter requestParameter:@"geolong" value:longitude],
                                 nil]];

[locationsRequest prepare];
NSData *locationsData = [NSURLConnection sendSynchronousRequest:locationsRequest returningResponse:nil error:nil];
NSString *locationsString = [[[NSString alloc] initWithData:locationsData encoding:NSUTF8StringEncoding] autorelease];

    [locationsRequest release];
    SBJSON *jsonParser = [SBJSON new];
    NSError *error = nil;
    return [jsonParser objectWithString:locationsString error:&error]; 
}

Here is setUpTableArray:

- (void) setUpTableArray:(NSDictionary *)dict {

    NSArray *array = [dict objectForKey:@"groups"];
    if (array != nil) {
        self.placesArray = array;
    }
}
  • 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-15T20:08:40+00:00Added an answer on May 15, 2026 at 8:08 pm

    Wow, I definitely found my own problem this time. Just get rid of [locationsRequest prepare]; I definitely saw code somewhere that has that, but this tells me otherwise.

    EDIT
    Turns out this was a memory-memory allocation error. Getting rid of that line wasn’t the actual fix. It seems to be some problem with a string being auto-released. I asked a follow up question here.

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

Sidebar

Ask A Question

Stats

  • Questions 501k
  • Answers 501k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You will need to perform some sort of search unless… May 16, 2026 at 2:21 pm
  • Editorial Team
    Editorial Team added an answer IF you updated 20M rows in one single transaction, then… May 16, 2026 at 2:21 pm
  • Editorial Team
    Editorial Team added an answer Make sure that you're removing the copy of the driver… May 16, 2026 at 2:21 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Cocoa newbie here. I am working on an iPhone UITableViewController-based widget that can be
I am working on an application that consists of a TabBar controller. Within on
When working with third party systems, especially very configurable systems that dynamically load providers,
Am working on a Java application that requires me to display PDF documents within
I'm using a UIImageView as the accessoryView in a UITableViewCell that I'm creating programmatically.
I am having trouble getting my UITableViewController to reload/refresh the data. I have a
I have an application that has a UITableView. This UITableView is populated by an
This morning I ran into a crash in an iPhone app I am working
I load view controllers all the time in the following format: -(void)loadSelectUser { MyViewController
Working on trying out the market licensing service, and I'm running into a few

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.