Re: Switching methods in private classes in Apple frameworks
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