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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:59:06+00:00 2026-06-07T18:59:06+00:00

I have the following custom object: @interface LoadDescription : NSObject @property (nonatomic) float start,

  • 0

I have the following custom object:


@interface LoadDescription : NSObject
@property (nonatomic) float start, stop, startMagnitude, stopMagnitude;
@end

I have the object in one of my controllers as a property:


@property (nonatomic, strong) LoadDescription *editingLoad;

But when I try to set/get the properties within the editingLoad property...


float tableValue = [textField.text floatValue]; 
NSLog(@"value in table is %f", tableValue);
self.editingLoad.startMagnitude = tableValue;
NSLog(@"Load magnitude is %i", (int)self.editingLoad.startMagnitude);

...and run iOS, the console output shows that while tableValue is whatever I input it as, self.editingLoad.startMagnitude is always 0.00000000, which makes me think that something's wrong with the setter/getter.

I am running ARC, if that's relevant.

Any help is appreciated, thanks in advance!

  • 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-07T18:59:08+00:00Added an answer on June 7, 2026 at 6:59 pm

    Is the editingLoad object alloc’d and init’d prior to the property assignment?

    If not that may be your problem, else if you are type cast int to float that is less than 1 i believe it will always be zero. I don’t know what values you are expecting from the “tableValue”

    What happens when the second log prints out a float/double “%f” ?

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

Sidebar

Related Questions

What I am attempting to do is the following: I have a custom object
I have the following code that processes an INotification (custom interface) var mgr =
I have created the following subclass to do some custom drawing: // DocumentIconView.h @interface
I have the following custom event: package com.un.photoManager.events { import flash.events.Event; import mx.collections.ArrayCollection; public
I have following code using hibernate to throw a custom exception on error and
I have an activity that appears as a dialog using the following custom theme:
I have defined following control template for my custom control. <ControlTemplate TargetType={x:Type local:CustomControl}> <Grid
I have the following HorizontalScrollView with 2 custom views. For some reason it doesn't
I have the following ListView with a custom list item: I would like to
I have the following methods in my simple Custom Parser Class, when I execute

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.