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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:06:21+00:00 2026-05-18T11:06:21+00:00

I have a property list ( Data.plist ) that contains an array of two

  • 0

I have a property list (Data.plist) that contains an array of two dictionaries. Each dictionary is filled with key names (Factor 1, Factor 2, etc) and floats (0.87, 1.15, etc.). I am trying to access the numbers stored in the dictionary. First I load the dictionary using:

NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *finalPath = [path stringByAppendingPathComponent:@"Data.plist"];
NSArray *plistData = [[NSArray arrayWithContentsOfFile:finalPath] retain];
NSDictionary *dictionaryOne = [plistData objectAtIndex:0];

Actually accessing the numbers stored is where I’m having a problem:

Float32 conversionFactor = [scyToLCMMen objectForKey:"Factor 50"];

I’m getting the error: “incompatible types in initialization“. What am I doing wrong? Is it not a Float32?

  • 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-18T11:06:22+00:00Added an answer on May 18, 2026 at 11:06 am

    Objective-c containers can only hold obj-c types, so what you get is not a float for sure. What you probably have is NSNumber object and you need to “extract” plain float value from it:

    Float32 conversionFactor = [[scyToLCMMen objectForKey:"Factor 50"] floatValue];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two lists of objects. Each list is already sorted by a property
If I have a property: public list<String> names { get; set; } How can
I have a List of beans, each of which has a property which itself
I have a model with a list property. I have a csv that has
I have a data grid in a view that is bound to a List
Imagine I have a property defined in global.asax. public List<string> Roles { get {
I have ControlA which accepts an IInterfaceB which has a property of type List<unknownType>
I have a List of Foo. Foo has a string property named Bar. I'd
I have a component which has a List<T> property. The class in the list
I have two collections which have property Email in both collections. I need to

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.