I'm trying to sum the integers from five UITextFields and post them to a UILabel.
This is the code I have tried. It works to begin with, then it start to mess up! Sometimes it doesent work at all!! Really weird!
int val = [textfield1.text intValue]
val = val+[textfield2.text intValue];
val = val+[textfield3.text intValue];
val = val+[textfield4.text intValue];
val = val+[textfield5.text intValue];
I'm trying to sum the integers from five UITextFields and post them to a UILabel.
This is the code I have tried. It works to begin with, then it start to mess up! Sometimes it doesent work at all!! Really weird!
int val = [textfield1.text intValue]
val = val+[textfield2.text intValue];
val = val+[textfield3.text intValue];
val = val+[textfield4.text intValue];
val = val+[textfield5.text intValue];
Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
Yes you are right. Really bad explenation. The code runs and builds just fine but it don't add right. The number showed on the label is wrong almsot every time!
Yes you are right. Really bad explenation. The code runs and builds just fine but it don't add right. The number showed on the label is wrong almsot every time!
Then you'll have to debug line by line.
__________________
regards
Oliver Drobnik Cocoanetics - Our DNA is programmed in Objective-C.
Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
Either yourself or somebody knowledgabe needs to build&debug the app and step through the code to see where the error lies. I can offer to do this for you , but I charge 75 Euros per Hour.
__________________
regards
Oliver Drobnik Cocoanetics - Our DNA is programmed in Objective-C.
Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
No, this is checking what's happening with the numbers, look in your Console to see what the output is, and see if the numbers match what you put into the UITextFields.