is it possible to format the .stringValue property of a NSString outlet without creating extra variables ??
@property (retain) NSString *myString;
@property (retain) NSString *myStringLabel;
–
@synthesize myString;
@synthesize myStringLabel;
myString.stringValue = myStringLabel.stringValue
/* but I want to format it with %.0f
so I don't get any fractional digits */
I am currently playing around with sliders and the values are of format 1.123312
I want to display only the leading number.
Assuming your input string is something that can be represented as a float :
or if you wanted to round the value instead :
I’m not sure why you would want to do this specifically on one line though?