• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing plist name changes Xcode editor layout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing plist name changes Xcode editor layout


  • Subject: Re: Changing plist name changes Xcode editor layout
  • From: Chris Espinosa <email@hidden>
  • Date: Thu, 4 Feb 2010 16:20:13 -0800


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.  

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.

Chris


 _______________________________________________
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

  • Follow-Ups:
    • Re: Changing plist name changes Xcode editor layout
      • From: Tom Harrington <email@hidden>
References: 
 >Changing plist name changes Xcode editor layout (From: Tom Harrington <email@hidden>)

  • Prev by Date: Changing plist name changes Xcode editor layout
  • Next by Date: Re: Changing plist name changes Xcode editor layout
  • Previous by thread: Changing plist name changes Xcode editor layout
  • Next by thread: Re: Changing plist name changes Xcode editor layout
  • Index(es):
    • Date
    • Thread