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

The Archive Base Latest Questions

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

i am getting exception over these lines of code dont know why its giving

  • 0

i am getting exception over these lines of code dont know why its giving so ..Help me out ..
reason is:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:   
'-[__NSArrayI floatValue]: unrecognized selector sent to instance 0x7c57840'

coord.latitude = [[[self.holdingArray objectAtIndex:k] 
valueForKey:@"latitude"]floatValue];
 coord.longitude = [[[self.holdingArray objectAtIndex:k] valueForKey:@"longitude"]  
 floatValue];

Edit 1

 -(BOOL)textFieldShouldReturn:(UITextField *)textField
{
[appDelegate.dealerDataGlobalArray removeAllObjects];
NSString *requestString;

requestString = [NSString stringWithFormat:@"http://www.hvinfotech.net/projects/carwash
/search.php?search=%@",textField.text];
NSString *strCOntents1 = [NSString stringWithContentsOfURL:[NSURL 
URLWithString:requestString] encoding:NSUTF8StringEncoding error:nil];

NSLog(@"Data: %@",strCOntents1);

NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:[NSURL  
URLWithString:requestString]];
DealerDetailParser *parser = [[DealerDetailParser alloc] 
initDealerDetailParserXMLParser];
[xmlParser setDelegate:parser];
[xmlParser parse];
appDelegate = (AppDelegate *)[[UIApplication sharedApplication]delegate];
NSLog(@"dealerDataGlobalArray...... %@",[appDelegate.dealerDataGlobalArray 
description]);
[holdingArray addObject:appDelegate.dealerDataGlobalArray];
NSLog(@"holdingArray...... %@",holdingArray);
flagForHoldingArray = YES;    
[self loadOurAnnotations]; 
[textField resignFirstResponder];
return YES;
}

i have edited so that it can be more clear. I am calling the webservice to get the data corresponding to what is entered in text field. After that i call the method in which previous line o code were posted…

Edit2

it gives like

    2012-01-23 00:27:35.475 CarWashApp[2584:11603] (
    {
    businessdesc = "having a garage and teamof 10members, originaly belongs to mumbai 
    maharashtra.";
    "businessdesc_de" = "having a garage and teamof 10members, originaly belongs to 
    mumbai maharashtra.";
    city = vadodra;
    "city_de" = "dadar_de";
    companyname = "Maruti Suzki Ltd";
    "companyname_de" = "Maruti Suzki Ltd _de";
    contactname = "bijju sharma";
    "contactname_de" = "bijju sharma_de";
    coupondetails = "10% Discount";
    "coupondetails_de" = "10% Discount _de";
    email = "bsharma@gmail.com";
    friday = "Friday: Closed";
    happyhour = "10:00 AM to 5:00 PM";
    id = 5;
    latitude = "22.30731";
    logo = "http://www.hvinfotech.net/projects/carwash/upload/images/Sunset.jpg";
    longitude = "73.181098";
    monday = "Monday: Closed";
    payment = Visa;
    payments = "";
    phone1 = 07932453453;
    phone2 = 07934344444;
    postcode = JU113;
    saturday = "Saturday:9:30 AM - 4:00 PM";
    services = "";
    state = Groningen;
    "state_de" = Groningen;
    streetaddress1 = "500 golf Road,";
    "streetaddress1_de" = "sectore 5 d_de";
    streetaddress2 = "airport Road";
    "streetaddress2_de" = "";
    sunday = "Sunday:9:30 AM - 4:00 PM";
    thursday = "Thursday: Closed";
    tuesday = "Tuesday:9:30 AM - 4:00 PM";
    website = "http://hvinfotechPvtLtd.com";
    wednesday = "Wednesday: Closed";
}
 )
  2012-01-23 00:27:43.434 CarWashApp[2584:11603] (
"22.30731"
)

i need only above value i.e “22.30731” as coordinate but its showing error if i also write like
coord.latitude = [[self.holdingArray objectAtIndex:k] valueForKey:@”latitude”];

  • 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-28T07:23:27+00:00Added an answer on May 28, 2026 at 7:23 am

    As @Rayfleck said, the object in the array might be not be the kind of object you’re expecting it to be. Use the debugger or NSLog() to find out what object it actually is.

    Another possibility, is you might have a memory management bug somewhere. Do you have ARC enabled?

    And finally, it could be a thread safety issue. In that case, best of luck finding it! There isn’t really any easy way to track down threading issues, except read every line of code and try to find the mistake.

    EDIT:

    You have this line of code:

    [holdingArray addObject:appDelegate.dealerDataGlobalArray];
    

    It looks like you are adding an array object to the holdingArray array. Array objects will return another array when you send valueForKey: to them (lookup valueForKey in the documentation for NSArray…).

    Anyway, the array object doesn’t respond to floatValue. Only NSString and NSNumber objects respond to floatValue.

    You should NSLog() these objects, because I think they are not what you expect them to be:

    NSLog(@"%@", [self.holdingArray objectAtIndex:k]);
    NSLog(@"%@", [[self.holdingArray objectAtIndex:k] valueForKey:@"latitude"]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't know why getting this error: Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1 From
i'm getting exception on Transformer transformer = tFactory.newTransformer(StreamXSL); but the error below is not
I'm getting an Exception while trying to insert a row in oracle table. I'm
I'm getting an exception from Cruise Control about not being able to connect to
I am getting this exception while accessing the jax-ws web service from my client.
Here I am getting the Exception when I am setting the recordsetting in AvAudioRecord.
I am getting Following Exception while configuring the Connection Pool in Tomcat This is
In one of our application im getting an exception that i can not seem
in my application I am getting an exception: MyApp(38431,0xa004ffa0) malloc: *** error for object
Why do I keep on getting an exception-illegal operation on ResultSet? Here is 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.