Skip navigation.
 
mlRe: What's the behavior for two categories with the same method extensions?
FROM : John C. Randolph
DATE : Mon Nov 18 16:33:01 2002

On Sunday, November 17, 2002, at 05:24 PM, Gregory Gerard wrote:

> Say I write a category extending NSString with -someTrivialMethod.
>  Then, I load a plugin from a third party which does the exact same
> thing but who has different behavior (possibly radically).
>
> Is there a cheap way to detect this before or after the fact?  What
> happens if I unload the plugin?  Does the category defined in the
> plugin pop-off giving me back my original behavior?


The version that loads last will win.  It will simply clobber the
method-table entry for that name.  The only way I can think of to
detect such a conflict would involve reading the symbols out of the
bundle you're about to load.  (Tricky.)

-jcr

John C. Randolph    <<email_removed>>  (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html


Related mailsAuthorDate
mlWhat's the behavior for two categories with the same method extensions? Gregory Gerard Nov 17, 17:25
mlRe: What's the behavior for two categories with the same method extensions? John C. Randolph Nov 18, 16:33
mlRe: What's the behavior for two categories with the same method extensions? Vince DeMarco Nov 18, 19:01
mlRe: What's the behavior for two categories with the same method extensions? Timothy Ritchey Nov 18, 19:24