Re: [Config Files] [Solved!] Config file evaluation problems
Re: [Config Files] [Solved!] Config file evaluation problems
- Subject: Re: [Config Files] [Solved!] Config file evaluation problems
- From: Rush Manbert <email@hidden>
- Date: Thu, 02 Mar 2006 17:14:54 -0800
Scott Tooker wrote:
On Mar 2, 2006, at 12:38 PM, Rush Manbert wrote:
It appears that editing my config files after they have been selected
from the "Based on" drop down has no effect on the build settings.
The config files are only read once, and there is no dependency
mechanism for detecting that they have changed. Is this by design?
This would be a bug that we should fix. Please file one :)
The intended behavior is that the current state of the configuration is
used when displaying build settings and building.
I see now that I was wrong. I publicly apologize to Scott, everyone
involved in the design and implementation of Xcode configuration file
support, the Xcode development team, and all Apple employees worldwide.
When I went back to make the screen shots to submit with the test
project, I discovered what my misunderstanding is. I will try to
describe it, and the actual behavior I have observed, for the benefit of
others who may follow. As always, this is unofficial and from a user, so
caveat emptor.
I was basing my conclusions on ZERO_LINK and PRODUCT_NAME, but they are
special cases. When a project is newly created, many build settings have
values, but a few of them are also displayed in boldface text. These are
the build settings that are considered to be "Customized Settings". If
you set a build setting using the inspector, then that setting is a
Customized Setting too. Customized Settings override settings from
config files.
This means that when I went to the Debug config inspector and said it
was based on my config file, and my config file said "ZERO_LINK = NO",
it had no effect, because ZERO_LINK had "Customized Setting" status. The
same thing applies to PRODUCT_NAME. Nothing in my config file can
touch it when it's bold, and it's bold by default when the project is
created.
(If your response at this point is "Well, duh!", then stop reading this
and do something more useful.)
As Greg Hurrell pointed out, the way to "uncustomize" a setting is to
select it and hit the delete key. If I did this, then the display of
Zero Link changed to a normal typeface (not bold), and it assumed
whatever value was specified in my config file. I believe that, in
general, it is assuming its "inherited value", which can be (according
to the docs) from the project level customized settings, the project
level config file, the Application Settings, the Built-in Defaults, or
the environment, in descending priority order. (If you make a new
project and examine the build settings for the project with
Configuration=Debug and Collection=All Settings, you will see that
"Always Search User Paths" is checked, but it's not bold. If you click
on it to uncheck it, it becomes a Customized Setting and displays in
bold. If you then highlight it and hit the delete key it becomes normal
typeface, but it's also checked again. I assume this inherits from the
Built-in Defaults.)
Finally, for all of the settings that are NOT Customized, their state
does indeed track the values set in your config files, as long as the
config files have been added to the project. The config files even
follow the auto save rules if you have set them in your preferences, so
the build settings will update before you start a build if you have
edited a config file but not yet saved it. I tested this with two levels
of config files. The "Based on" file included another file. If I edited
the second file, the build settings changed appropriately.
I still want some sort of config file search path capability, but the
basic config file behaviors make sense as long as you remember that
Customized Settings don't follow your config files, and some Settings
are Customized by default in a new project.
Hope this helps someone sometime,
Rush
_______________________________________________
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