• 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: CoreData can't handle booleans in metadata
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData can't handle booleans in metadata


  • Subject: Re: CoreData can't handle booleans in metadata
  • From: "Jim Thomason" <email@hidden>
  • Date: Mon, 6 Aug 2007 12:00:21 -0500

 > Stylistically, <true/> is preferred to <true></true>, but both should
> be equivalent and valid. That the latter is not handled correctly is
> a bug in the plist parser.
>
> I've previously filed bugs about both issues.

Good. I'm glad to know I'm not crazy. At least not in this case.

> For the cases where you put the values in, you can make sure you
> don't write booleans.

My concern was storing an NSNumber that I didn't create into the
metadata. Say it was preference that came from a checkbox or out of a
framework I was linking in. If it was an NSNumber created with
numberWithBool:, it'd write out <true></true> and trigger the bug.

So I went and wrapped up all of those places with:

[NSNumber numberWithInt:[someNSNumberObject intValue]]

to ensure that it's always an integer NSNumber.

Clunky, but it prevents the problem. Unless I missed one, of course. ;-)

-Jim.....
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >CoreData can't handle booleans in metadata (From: "Jim Thomason" <email@hidden>)
 >Re: CoreData can't handle booleans in metadata (From: Jim Correia <email@hidden>)

  • Prev by Date: NSSearchField small size
  • Next by Date: Re: NSSearchField small size
  • Previous by thread: Re: CoreData can't handle booleans in metadata
  • Next by thread: Problems with NSTabView and Key chain after adding and removing Tabs
  • Index(es):
    • Date
    • Thread