Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
I just finished my Experience Point Calculator for gaming (with much help from this board). I want to go through and clean up code and maybe add a few things but I don't want to mess with the original project.

Whats the best way of duplicating a project? I ask because I know there is the source folder that I copy things into and I don't know if those things will get duplicated too.

Is there a standard way of making a copy of the whole project and renaming it version 2 for instance?

-Lars
 

PatrickCocoa

macrumors 6502a
Dec 2, 2008
751
149
Again with the file system, oy!

I just finished my Experience Point Calculator for gaming (with much help from this board). I want to go through and clean up code and maybe add a few things but I don't want to mess with the original project.

Whats the best way of duplicating a project? I ask because I know there is the source folder that I copy things into and I don't know if those things will get duplicated too.

Is there a standard way of making a copy of the whole project and renaming it version 2 for instance?

-Lars

Again you're going to the file system as your default method of interacting with your data. In this case you have Xcode, think of Xcode as an umbrella that controls your data - pretend you can't see your files. Xcode unfortunately doesn't have a "duplicate project" command that I'm aware of.

But Xcode does have access to source control methods, like Git and Subversion. Both of those will do what you want. Unfortunately, learning either of those is too big of a topic for right now, although you'll want to learn one or the other at some point.

So I'm back to using the file system to duplicate the project. Find the folder that contains the (projectname).xcodeproj file. Duplicate that folder, go in and change the file name of the duplicated (projectname).xcodeproj file. Then open that new .xcodeproj in Xcode. And hope that you didn't have any indirect references to files in your original project.
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Thanks Patrick, that is what I was thinking. I was not sure so I thought I would ask first before I duplicated the folder and renamed the project file. With more everything else I work with I save other versions to be safe. I did not now if there was a proper way so I thought I would be safe and ask.

Thanks!

-Lars
 

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5)

I would just like to echo PatrickCocoa's point in the middle of his post.

Get with SVN or Git earlier rather than later. Make it part of your workflow even for the simple stuff, so that when things aren't so simple you already have experience and "good habits".

B
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
I have seen "SVN or Git" but I don't even know what they are yet in my learning curve. Learning C was a piece of cake compared to Object- C. Not because its easier, but because Object-C is so much bigger. I think Jim said something like you don't learn the whole thing but you can look everything up. Right now I am just trying to do repetitive stuff so what I learned so far sinks in.

I think in order to be really good at Objective - C you need to have a full time job doing it.

I am looking forward to my Java Class at City collage next semester. Pascal was a nice structured learning environment. Self learning is kind of random.

-Lars
 

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
I have seen "SVN or Git" but I don't even know what they are yet in my learning curve.

SVN or Git is basically Time Machine on steroids for code projects (or pretty much anything else that is largely text files).

Both integrate in quite easily into Xcode so they integrate easily into your workflow.

EDIT: Here's some documentation from the Xcode Users Guide http://developer.apple.com/library/....html#//apple_ref/doc/uid/TP40010215-CH7-SW12 and a link to a hosted SVN/Git provider I use myself. http://beanstalkapp.com

Learning C was a piece of cake compared to Object- C. Not because its easier, but because Object-C is so much bigger. I think Jim said something like you don't learn the whole thing but you can look everything up.

I think you are referring to the anecdote I posted again recently here: https://forums.macrumors.com/posts/12883802/

I still think it bears repeating:

Cocoa in a Nutshell said:
It's practically impossible to know Cocoa inside and out. There was once a discussion between two programmers about Cocoa's large APIs: one was a veteran Perl programmer, the other a Cocoa programmer. The Perl programmer grumbled about the intimidating and verbose Cocoa APIs, saying there was simply too much to remember. Bemused, the Cocoa programmer retorted: “You don't remember Cocoa; you look it up!”

All the best with your free-code and getting back into more structured work at CC in the fall.

B
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
haha... It was you and not Jim that said it, my bad :) I know you don't remember cocoa but you look it up, but first you need to know what to look up. So I guess you can learn it and then forget it as long as you remember there was some code snippet out there to make your life easier.

2 days ago I was struggling with the fact that I could not make a second window pop up by pressing a button on the first window. I was control dragging from the window and I was getting an UBOutlet for NSView. I had no idea that there was a difference between control dragging the window and the bar above the window to get an NSWindow and not NSView. Now I know.

I'm thinking of getting this book http://www.amazon.com/Cocoa-Recipes-Mac-OS-X/dp/0201878011 It seems to guide you through a large project and not small tutorials. But everything is Xcode 3 still.

I Learn a little every day.

-Lars
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
I'm thinking of getting this book http://www.amazon.com/Cocoa-Recipes-Mac-OS-X/dp/0201878011 It seems to guide you through a large project and not small tutorials. But everything is Xcode 3 still.

You want the 2nd edition. http://www.amazon.com/Cocoa-Recipes-Mac-OS-2nd/dp/0321670418.

I read through this book for the same reason of having one project which evolves. Although, I would take book with a grain of salt. I can't remember specifics, but I do remember deviating from what the book did, because I didn't think it was right to do it that way.
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Thanks. I downloaded the 2nd Edition for the kindel app on my iPad. I am going to finish the Objective - C for Absolute beginners first then start on it. I hope I can covert from their Xcode 3 examples to Xcode 4 easily. I never used interface builder in version 3, I was just writing console based stuff. I only got GUI a couple weeks ago in version 4.

-Lars
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.