Category Image Setting up Java Packages in XCode


I has a few source classes belonging to a package and I had trouble figuring out how to set up the physical folder structure on the hard drive and the group structure in XCode so that XCode would not change its mind about where it expected the java files every time I tried to build the app. Ray Kiddy had the know how .......... here is a transcript ........

On Jan 5, 2007, at 10:00 AM, Kieran Kelleher wrote:
OK, VexCode is freaking me out today. (I know, I know .... switch to Eclipse .... don't worry as soon as possible)
Anyway, I have a few java classes and they are in a package
package wk.demography;
No matter where I put the darn files, XCode freaks out upon building that it cannot find them.
What is the standard way to structure directories in an XCode project for packages and how to add them to the project with the confusing XCode groups?
Thanks, Kieran
_______________________________________________
Kieran

It is a bit inelegant, but I try not to fight this fight with Xcode.

Try this. In your project directory, create the "wk/demography" directories.

Then add a group in the Xcode G&F (Groups & Files) view. Name it "wk". Then go into the inspector for the group and set the path to the wk directory. Then, inside that group, create a new group named "demography". Then go into its inspector and change its path to the demography directory. Then put your sources in that group.

The only awkward thing about using the yellow-folder references in this way is setting them up. After they are set up, one does not have to worry about them again.

We could talk about using blue-folder references to do this, but let's not.

- ray

Posted: Friday - January 05, 2007 at 04:28 PM        


Published by