site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=U87TGhVgwfvCO4joQ+EWjXr/ohbbXKYRv9/Y+x7qRWc=; b=PBgjI5AD1Wpt855R6pfXlyFGV5gloNWk8xfwH5YQtBFeor23KfBHM8mj4syhLKEVzS PLZTuh6yJD+/cf+NefTwqTKMKD774gcwTtjlkCUF9fTlThC1EQZd3uqgG1z79e93TA21 ZBufs1uGgoSfeZZWjrgbPOftmiDaOT9FKasDw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=c/BLEi+69/3P2QG7r9UIKv+9X2UzkhQQbWOLtr0r0SaikB8aGz2WdmoyO9W0b8iOkb HH66BtUvxHoxnqgsRS1851ByXMixXWqG0ePW4rnyfsMqc75HBUnkoYqsfidZG4kym+4Y bl6VM1T1UDllb2XS2yP6k1rvKSYFu3he4kGOw= Hello! I'd like to override delegate functions in Cocoa app. They are in Class1 and Class2 (which is an instance of Class1). I get these classes via objc_getClass(). Then I coded two functions and add them to classes using class_addMethod(). Then I called method_exchangeImplementations() for both of them. Replaced delegate for Class1 works fine. But replaced delegate for Class2 don't work. It starts working only for new instances of Class1 (and Class2 as Class1 instance variable), but don't work for original instance. How to make it work? PS: First I tried to use categories to override these delegates, but for x86_64 linker don't link it as "lazy bound", even with "-undefined dynamic_lookup" (i386 do it fine). Am I right that its impossible to use categories anymore? Thanks in advance, Donnie. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Donnie Lee