Re: A newbie question—how to save a file?
Re: A newbie question—how to save a file?
- Subject: Re: A newbie question—how to save a file?
- From: Ken Thomases <email@hidden>
- Date: Fri, 6 Feb 2009 00:19:02 -0600
On Feb 6, 2009, at 12:08 AM, Chris Espinosa wrote:
On Feb 5, 2009, at 9:50 PM, Aayush Arya wrote:
I’m very new to Xcode and programming in general. I recently bought
a book Programming in Objective-C 2.0 by Stephen G. Kochan and am
learning how to write Objective-C code with the help of that.
I chose Foundation Tool when I opened a new project (called
‘prog1’) and write my code in the ‘prog1.m’ file. Now, I want to
save that particular file with another name and start writing
another program in a new file. How do I go about doing that?
If you want to add a new class or code file to an existing project,
choose "New File..." from the File menu, and pick the kind of file
you want.
If you want to create a new program, you probably want to first add
a new target. Each target in your project generates one build
product (program). If you want your project to build two or three
different programs, you'll need two or three targets. Each target
will have its own name, and can build a program with its own name,
source code, and behavior.
1) Choose Add Target... from the Project menu
2) Fill out the form and create the target
3) Then choose New File... from the File menu to add the appropriate
kind of code file to the target. Make sure to check the box for the
target you want to add the code file to, and uncheck the boxes for
other targets.
Then you can enter your code into the new file. When you build the
target, the code is compiled into a program.
Good advice.
As an addendum, if you really just want Xcode to save the contents of
the current file to a new file, but not have it change your project,
hold down the Option key to see the menu item Save A Copy As in the
File menu.
Cheers,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden