Re: Source File Paths Outside of Project
Re: Source File Paths Outside of Project
- Subject: Re: Source File Paths Outside of Project
- From: Brian Barnes <email@hidden>
- Date: Wed, 12 Sep 2012 09:18:30 -0400
On 9/11/2012 2:16 PM, Quincey Morris wrote:
On Sep 11, 2012, at 10:47 , Brian Barnes <email@hidden
<mailto:email@hidden>> wrote:
The procedure is this:
1) pick the files I want to include using a right-click/add
2) the files come in, but they are red (these files are outside the
project folder)
3) the files import as "relative to group" with a bad absolute path.
Note that I am importing them by right-clicking on a group, which
might be another cause of the problem
4) change to relative to project, and re-pick the file with the little
button next to the file path
5) Now the file has a proper relative path (/../../../ whatever kind
of thing)
The problem is I'd like to avoid all these steps. In 3, if I added
files, they'd come in as relative and work right. I think it was the
addition of all the new (if I'm not mistaken) path types that have
messed this up.
Try this:
-- Select the empty group (or create a new empty group).
-- In the info pane on the right, click the "Choose" button.
-- In the Open panel that appears, choose the top level directory of the
"outside" hierarchy you want to add. Now the group itself represents the
hierarchy, kinda.
-- Add files in the outside hierarchy to the group (using the option to
create sub-groups for sub-directories automatically, if that's what you
want). Added files should now have no path relative to the group (or, if
there are sub-directories, relative paths for just the sub-directories).
It's also possible, if you've already added the files and they show up
red, you can fix it directly by choosing the base directory for the
group as above, but it depends a bit on what went wrong in the first
place (which sounds like an Xcode bug).
AFAIK, Xcode 4 didn't introduce any new path modes (relative to group,
etc). In fact, the mechanism generally works a lot better in Xcode 4 --
in 3 it was easy to get into a red-name state you couldn't get out of.
FYI: This is probably the best way to do this, after trying out a number
of suggestion. If you have one main group, if you set that group to the
top level folder that encloses all your code items, all groups inside
now seem to work properly.
Not sure what changed between 3/4, but this is a simple solution that
fixes all my problems.
[>] Brian
_______________________________________________
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