Re: Swizzle class property?


Shane Stanley
 

On 27 Aug 2019, at 4:51 am, Jens Alfke <jens@...> wrote:

Shouldn't that be "if (!didAddMethod)" ?
Thank you! It didn't occur to me because it's been working like that elsewhere for several years -- but with an instance method (and different class). Looking again, I'm not sure that class_replaceMethod() branch will ever work. I should probably just call class_addMethod(), and regardless of result call method_exchangeImplementations().

--
Shane Stanley <sstanley@...>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>

Join {cocoa@apple-dev.groups.io to automatically receive all group messages.