| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Aug 01, 2008
Posts: 6
![]() |
Hi everyone, I am making a program that converts just about anything, and I am making the part where it converts length as in, Standard Units and Metric Units.
I made an NSComboBox in Interface builder, I just need a little step by step on what to do from there. Here is how I need it to work: 1. Choose Dropdown from the Window to choose your selection. (Lets say Inches to Meters) 2. Type the amount you want converted in an NSTextField (Editable) 3. Click Convert I know all the Math you need to do to do this, to turn an inch into a meter you need to Multiply it by 2.54 then multiply the answer by 0.01. This is what I have for "Length.m" Code:
#import "Length.h"
@implementation Length
@synthesize I2M;
- (float) inchesToMeters {
return (self.I2M * 2.54) * 0.01;
}
@end
Last edited by jivhg; 08-01-2008 at 08:30 PM. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
All times are GMT -4. The time now is 04:22 PM.
Powered by vBulletin