• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A newbie question?how to save a file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A newbie question?how to save a file?


  • Subject: Re: A newbie question?how to save a file?
  • From: "Ken G. Brown" <email@hidden>
  • Date: Fri, 6 Feb 2009 12:43:22 -0700

At 9:20 AM -0800 2/6/09, email@hidden apparently wrote:
>Date: Fri, 6 Feb 2009 00:19:02 -0600
>From: Ken Thomases <email@hidden>
>Subject: Re: A newbie question?how to save a file?
>To: Chris Espinosa <email@hidden>
>Cc: Xcode-users list <email@hidden>
>Message-ID: <email@hidden>
>Content-Type: text/plain; charset=WINDOWS-1252; format=flowed;
>	delsp=yes
>
>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

Another nifty feature that I just discovered which you might find handy for the multiple targets use case, is cntl-click on the Groups and Files header to add a 'Target Membership' column to the Groups and Files listing.

Ken G. Brown
 _______________________________________________
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

  • Prev by Date: Re: Source debugging of 3rd party framework
  • Next by Date: Re: Help on Stack trace
  • Previous by thread: Re: Source debugging of 3rd party framework
  • Next by thread: Info.plist preprocessing and header dependency
  • Index(es):
    • Date
    • Thread