• 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: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patching implementation in +load. Was: …Mapping Model : Spurious Warning


  • Subject: Re: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 7 Sep 2010 15:55:57 -0700

On Tue, Sep 7, 2010 at 3:41 PM, Jerry Krinock <email@hidden> wrote:
> Messy.  I added a +load method to the NSMigrationManger category that I added, and invoked the patch in there.  Seems to work fine.  Is +load [2] not the recommended place to invoke patches?

+load is kind of risky. See Bill Bumgarner's discussion of
initialization methods here:
http://www.friday.com/bbum/2009/09/06/iniailize-can-be-executed-multiple-times-load-not-so-much/

Since all you're doing is adding methods, +load might be an okay time
to do things, except if the method you're replacing comes from a
category. You might want to defer to +initialize instead.

--Kyle Sluder
_______________________________________________

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: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
      • From: Kyle Sluder <email@hidden>
References: 
 >Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment? (From: Jerry Krinock <email@hidden>)
 >Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment? (From: Quincey Morris <email@hidden>)
 >Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment? (From: Jerry Krinock <email@hidden>)
 >Patching implementation in +load. Was: …Mapping Model : Spurious Warning (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?
  • Next by Date: Re: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
  • Previous by thread: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
  • Next by thread: Re: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
  • Index(es):
    • Date
    • Thread