no, no I can do the second thing, infact I did that as soon as I read what you posted. However I mean I don't know how to do the first option... Sorry for not showing it's on a button, I didn't think that was nescessary to show you...
here's the complete code for it:
Code:
- (IBAction)button1:(id)sender
{
switch (number)
{
case 0:
temp1 = temp1 * 10 + 1;
[totalField setFloatValue:temp1];
break;
default:
temp2 = temp2 * 10 + 1;
[totalField setFloatValue:temp2];
break;
}
}
That's when you press the button, as you can see I included the *10 into it.
This is the code to show that totalField is a text field:
Code:
IBOutlet NSTextField *totalField;
Also, it is C code, mostly... it uses different things to regular C code... It even compiles using GCC...