Objective C Tutorial?

Ghoser777

Registered
Does anyone know if there is a good objective C tutorial anywhere online? The documentation at apple isn't much of a walkthrough - I was looking more for something along the lines of a step-by-step builing of how Objective C syntax works. Aka: With extensive and complete sample code -> HelloWorld, Add3numbers, etc. Anybody got any ideas? I really want to learn objective C, but my only coding knowledge right now is of java, although I can seem to hack a little C++.

Thanks a lot,
F-bacher
 

muskie

Registered
As someone who recently learned Objective C, about 8 months ago I can tell you there is little out there. Nothing in print and not a lot on the web. There is a pdf that comes with WebObjects that was published by NeXT so you know it's been around. http://www.stepwise.com is a good place to look, they have a new tutorial on programming for OS X which I've yet to have a look at it, I don't know if they did it in Objective C.

If you know Java well and if you know C you have a head start, memory management is a lot different no garbage collection.

hello world eh...

- (void) helloWorld
// This would just print Hello World in the console
// I made it a better example has it has actual object creation in it now...
{
NSString *helloWorld = [NSString stringWithString: @"Hello World"]; //This is now an autorelease variable and not a constant string.
NSString *mustBeReleased = [[NSString alloc] initWithString: @"Hello World Again"];

NSLog(@"%@", helloWorld);
NSLog(@"%@", mustBeReleased);

[mustBeReleased release];

//return nil; // not needed...
}


Muskie

I read part one of StepWise's Cocoa introduction it will be exactly what you want. Or at least will be way better then anything I could cobble together. Part one has an excellant set of links to additional sources of info as well.

[Edited by muskie on 11-09-2000 at 12:33 PM]
 

iconara

Registered
why not use java, since you know that language? as far as I know it is not interpreted in Cocoa but compiled. But I might be wrong. Am I? I love the possibility of using Java for serious program development.

theo
 

Ghoser777

Registered
Originally posted by iconara
why not use java, since you know that language? as far as I know it is not interpreted in Cocoa but compiled. But I might be wrong. Am I? I love the possibility of using Java for serious program development.

theo
Oh, i;ve made several coca apps using java... but it is so much slower than any C program and is definitly a memory hog. For what I want to do, JAVA isn't the best option.

F-bacher
 

muskie

Registered
I made my code sample better, it was the end of the day for me I was tired. If your serious about developing for Cocoa, check out StepWise's new tutorial. I'm on dial up so I haven't been able to download the developer kit at home. :-( I tried one night, I started the download and went to bed, I turned off sleep but something still went wrong about half way through. Maybe I'll have to bite the bullet and cough up for Shaw at Home or is it Rogers now...

Anyway this will not be until after I move. I have at least one Java App I wrote at school that I want to add more features to it would be a good candidate to Cocoa-ize. I wrote it on Solaris. It's stuck on a disk though (now diskdrive in new Macs) I may be able to ftp it from my school account. I can access my schools servers almost a year after I graduated which I find a bit odd.

Back to work,
Muskie

 
Top