• 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: Switching methods in private classes in Apple frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switching methods in private classes in Apple frameworks


  • Subject: Re: Switching methods in private classes in Apple frameworks
  • From: "Paul Sanders" <email@hidden>
  • Date: Fri, 12 Mar 2010 10:49:16 -0000

*Why* is there no supported way to replace (or, rather, augment) methods in a class which one cannot override because one does not create instances of that class oneself?  It seems to me that this is just as legitimate as putting a category method on that class , but the latter approach is often useless as one cannot call 'super' (and again, why not?)

As for something like this breaking after a software update, it seems to me that this is likely only when a major new release comes out and, since there are _always_ issues with major new releases of OS X it doesn't actually worry me all that much.

Paul Sanders.

----- Original Message -----
From: "Bill Bumgarner" <email@hidden>
To: "Gideon King" <email@hidden>
Cc: "Cocoa Dev" <email@hidden>
Sent: Friday, March 12, 2010 6:36 AM
Subject: Re: Switching methods in private classes in Apple
frameworks


Where "careful about what you do" includes "only use this in debugging code or non-production instrumentation", sure....

Do *not* ship such shenanigans in production code.   One software update later and suddenly the presumptions made about that internal method you are replacing/overriding/augmenting are no longer true and *boom*.
_______________________________________________

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: 
 >How to debug this error on closing a document? (From: Gideon King <email@hidden>)
 >Re: How to debug this error on closing a document? (From: Kyle Sluder <email@hidden>)
 >Re: How to debug this error on closing a document? (From: Gideon King <email@hidden>)
 >Re: How to debug this error on closing a document? (From: Jerry Krinock <email@hidden>)
 >Switching methods in private classes in Apple frameworks (From: Gideon King <email@hidden>)
 >Re: Switching methods in private classes in Apple frameworks (From: Greg Parker <email@hidden>)
 >Re: Switching methods in private classes in Apple frameworks (From: Gideon King <email@hidden>)
 >Re: Switching methods in private classes in Apple frameworks (From: Jerry Krinock <email@hidden>)
 >Re: Switching methods in private classes in Apple frameworks (From: Gideon King <email@hidden>)
 >Re: Switching methods in private classes in Apple frameworks (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Switching methods in private classes in Apple frameworks
  • Next by Date: incorrect bitmap date from NSBitmapImageRep from NSDate
  • Previous by thread: Re: Switching methods in private classes in Apple frameworks
  • Next by thread: Re: Switching methods in private classes in Apple frameworks
  • Index(es):
    • Date
    • Thread