Originally posted by Thinine:
You couldn't scan and post that outline, could you? I think it would help me a lot. Thanks.
I hope this helps.
Open Project Builder and create Cocoa Application Project
Open MainMenu.nib and design user interface using Interface Builder
Create a subclass
Click on the Classes tab
Select NSObject (or the appropriate superclass) and press Return
Name the subclass MyController (or something more appropriate)
Define an outlet
Select MyController in Classes
Select Attributes in inspector
Click Outlet tab
Choose Add Outlet and name an outlet for each text field
Add another outlet with a name based on the action such as converter
Define actions
Choose Add Action and name it for the action
Generate an instance
Select MyController in Classes
Choose Instantiate MyController from the Classes menu
Connect the class to the interface fields
Control drag from the instance to each text field
In the connections, select the outlet that corresponds to that field
Click Connect
Connect the interface controls to the class
Control drag from the button to the instance
Select target in the outlets column
Select convert in the actions column
Click Connect
Define the class to receive the action
Select NSObject and press Return
Name the subclass Converter
Instantitate the Converter class
Click Instances tab
Control drag from MyController to Converter and click connect
Generate source files
Select each custom class and choose Create Files from the Classes menu
Validate the Insert Into Targets and Click Choose
Move source files
Go to Project Builder
Select the generated source files and drag them into Classes
Add member declarations to be called from the Controller
Declare the calculation in a member in Converter.h
Implement the calculation in Converter.m
Implement action members
Add #import "Converter.h" to MyController.m
Get information from interface fields
Call conversion routine with values using outlet name, not subclass
Set interface fields with returned information
Implement the awakeFromNib method
Add a member to MyController.m based on the first text field