Re: Changing plist name changes Xcode editor layout
Re: Changing plist name changes Xcode editor layout
- Subject: Re: Changing plist name changes Xcode editor layout
- From: Tom Harrington <email@hidden>
- Date: Thu, 4 Feb 2010 17:40:34 -0700
On Thu, Feb 4, 2010 at 5:20 PM, Chris Espinosa <email@hidden> wrote:
> On Feb 4, 2010, at 3:53 PM, Tom Harrington wrote:
> It appears that Xcode makes assumptions about a property list's
> contents based on its file name.
>
> I had a plist named unitNames.plist, and I was able to edit it
> normally-- it has multiple levels of hierarchy and I could edit each
> one, set data types for each element, etc.
>
> Then I renamed the file to unitInfo.plist, and now Xcode apparently
> assumes that it's an application's Info.plist file. No data types are
> shown, and collections are just marked as "Information Property List".
> See a screenshot at
> <http://skitch.com/atomicbird/nu4bs/unitinfo.plist>.
>
> This seems buggy-- Xcode shouldn't change the editor layout just
> because the filename is different, if the file extension hasn't
> changed. If I'd changed it from ".plist" to ".m" I'd expect weirdness
> but not in this case. Is this a bug or is it, by some logic, intended
> this way?
>
> It's intended, but of course reversable: View > Property List Type.
Thanks, I had not found that option. That's what I needed.
> But my advice is that if a property list does not have the required keys for
> a Mac OS X Information Property List, you shouldn't call it an "info.plist"
> because that will just confuse AppKit, CoreFoundation, and any source code
> maintainers who have to support your code later. The frameworks have a
> special meaning for an Info.plist file in a bundle, and if you accidentally
> copied that file into the canonical place in your bundle, your app would
> fail to load because it lacks the required key/value pairs to be a true
> Info.plist.
But it's not called Info.plist-- I called it unitInfo.plist because it
contains miscellaneous info regarding measurement units the app knows
about. I could call it unitDetails.plist or something else, but it
doesn't make sense that any file with both "info" and "plist" in its
name would be assumed to be an app's Info.plist.
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
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