Basic Cocoa App

Well I started looking into Cocoa programming so I could develop some Mac applications. So here is my first tutorial on how to develop using Objective-C language.

[embedyt] http://www.youtube.com/watch?v=fGZufe9sfGc%5B/embedyt%5D

I will post the Hello.h and the Hello.m files cause I know they are tuff to read.

//  Hello.h
//  HelloWorldApp

//  Created by John Costanzo on 7/13/09.
//  Copyright 2009 JC Web Concepts. All rights reserved.

#import  
@interface Hello : NSObject
{
    IBOutlet NSTextField *textField;
}
- (IBAction)sayHello:(id)sender;
@end

 

//  Hello.m
//  HelloWorldApp

//  Created by John Costanzo on 7/13/09.
//  Copyright 2009 JC Web Concepts. All rights reserved.

#import "Hello.h"  
@implementation Hello
- (IBAction)sayHello:(id)sender
{
  //Say Hello
  [textField setStringValue:@"Hello, World!"];
}
@end

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s