# Help with Xcode please!



## Tyaedalis (May 21, 2005)

I don't know how to make just an Objective-C file, and not C++.  Can I do this at all?  I'm also very new (just started learning yesterday) to the language.


----------



## kainjow (May 22, 2005)

File > New File, then under the *Cocoa* heading select _Objective-C class_ and press Next. Then enter the class name for your Objective-C object and leave the .m extension.


----------



## Tyaedalis (May 22, 2005)

what type of project file do i use?


----------



## Viro (May 22, 2005)

If you're making a GUI application, choose Cocoa Application. If it is going to be text based, use Foundation tool.


----------



## Tyaedalis (May 22, 2005)

ok thanks!


----------



## ngcomputing (May 23, 2005)

Tyaedalis said:
			
		

> I don't know how to make just an Objective-C file, and not C++.  Can I do this at all?  I'm also very new (just started learning yesterday) to the language.




From my point, you will need to know Objective-C as "a programming language" then you need to know the in's and out's of Interface builder and how they interact together to form a single application.

Really, I would rather use C++, Objective-C syntax just seems to me to complicate things versus C++ which has been widely popular, across all platforms, for many years now. Not really many books on the subject of using Xcode tools to program in C++ and interconnect to resource files built with Interface builder though.

I know where you are coming from though. After running around a few tutorials, etc, the last few days getting familiar with Cocoa and Objective C, I decided to order a couple of books.  As recommended to me, Learning Objective-C and Cocoa Programming.


----------



## kainjow (May 23, 2005)

Objective-C syntax is super easy to read.

Pretty much if you know C++ or Java, you can pick up Objective-C pretty easily.

```
// C++/Java
object.method(value);

// Objective-C
[object method:value];
```
Now learn the syntax for classes, and you're set


----------



## Viro (May 24, 2005)

The only gripe I have with objective-C is that it is very verbose. This verbosity is sold as a feature, being self documenting and all that.


----------



## Tyaedalis (May 24, 2005)

oops! i meant plain C, not objective C.  I know i need to learn C++, and I'm going to as soon as i learn more C.


----------

