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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:06:21+00:00 2026-06-10T00:06:21+00:00

In my interface header file I have: @proprty (readwrite, assign) float longitude; If I

  • 0

In my interface header file I have:

@proprty (readwrite, assign) float longitude;

If I assign a value to that property like this:

loc.longitude = [[NSString stringWithUTF8String:(const char *)attr->children->content] floatValue];

The debugger says [loc longitude] does not appear to point to a valid object.

but if I use

NSLog(@"%f", [[NSString stringWithUTF8String:(const char *)attr->children->content] floatValue]);

the float value is written.

What am I doing wrong, its like the value is not being assigned to the property?

  • 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-06-10T00:06:22+00:00Added an answer on June 10, 2026 at 12:06 am

    You said “The debugger says [loc longitude] does not appear to point to a valid object.”

    I suspect that you are trying to use this debugger command:

    po [loc longitude]
    

    The problem is that [loc longitude] is indeed not an Objective-C object. It is a float. You need to use a different command to print it:

    p (float)[loc longitude]
    

    or, on a recent-enough version of Xcode/lldb, you can use the dot syntax directly:

    p loc.longitude
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have declared a property in the header file, for example @interface myClass {
I have a variable declared in the header file : @interface int _nPerfectSlides; and
I have a singleton here is the header file: #import <Foundation/Foundation.h> @interface Shared :
I have a class with the following property and method: header file below -
I have a ViewController class with the following structure: Header file: @protocol GCStageViewControllerDelegate; @interface
This is the header: @interface ForumBrowserAppDelegate : NSObject <UIApplicationDelegate> { ForumSelection *forumSelection; UIWindow *window;
i want to create some header file for future use but i have 1
In a header file such as this, when would an instance variable be used
My header file: @interface MapViewController : UIViewController <MKMapViewDelegate, NSFetchedResultsControllerDelegate> { MKMapView *mapView; NSFetchedResultsController *fetchedResultsController;
I have a UITableView showing data from a plist file. For this table view,

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.