PDA

View Full Version : Noob Question about COCOA code structure




LordZartek
Nov 20, 2008, 08:56 AM
Im assuming that the hierarchy of a class/subclass relationship is the attributes you can assign to objects right? however how do you find out the code for those attributes, like if i wanted to tell the text that appears in the text field to stream across, how would give that attribute to this code?


#import <UIKit/UIKit.h>

@interface Basic_iPhone_AppAppDelegate : NSObject <UIApplicationDelegate>
{
IBOutlet UIWindow *window;
IBOutlet UITextField *textField; //would it be entered here???
IBOutlet UILabel *label; // or in between this code with brackets?
}

@property (nonatomic, retain) IBOutlet UIWindow *window;

- (IBAction)click:(id)sender;

@end



johnnybluejeans
Nov 20, 2008, 09:35 AM
I've read your question a few times, and I still almost don't understand what you are asking. Either way, I think that the best thing you can do for yourself is to read a Objective-C / Cocoa primer. Apple has plenty of docs on their development site that you can read, even if you are not part of the iPhone dev program.

jnic
Nov 20, 2008, 10:07 AM
To add to johnnybluejeans's post, I found the following primer to be very helpful as well as being fairly concise: http://cocoadevcentral.com/d/learn_objectivec/