• 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: Core Data debugging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data debugging


  • Subject: Re: Core Data debugging
  • From: BJ Homer <email@hidden>
  • Date: Thu, 16 Jul 2009 14:19:13 -0600

>
>
>  NSError *err;
>> BOOL result = [moc save: &err];
>>
>
Make sure you initialize err:

> NSError *err = nil;


Otherwise, you may be dealing with a bogus error object, since method-scope
variables are not automatically initialized to 0.  (Instance variables are
initialized, btw.)  I don't think that would affect the return value of
save, but it's a good habit either way.

-BJ
_______________________________________________

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

  • Follow-Ups:
    • Re: Core Data debugging
      • From: Bill Bumgarner <email@hidden>
References: 
 >Re: Core Data debugging (From: email@hidden)
 >Re: Core Data debugging (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Core Data debugging (Fritz Anderson)
  • Next by Date: Re: Crash in ATIRadeonX2000GLDriver/IKImageFlowView - any workaround?
  • Previous by thread: Re: Core Data debugging
  • Next by thread: Re: Core Data debugging
  • Index(es):
    • Date
    • Thread