• 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
dynamic resolution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dynamic resolution


  • Subject: dynamic resolution
  • From: Louis-Philippe <email@hidden>
  • Date: Mon, 31 May 2010 08:45:36 -0400

Hi,

I am trying to add dynamic class methods to a class,
I implement:

@implementation MyClass

+ (BOOL)resolveClassMethod:(SEL)sel
{
if (sel == @selector(MySel)) {
class_addMethod(R3DSDKMeta.self, sel, (IMP)dynamicMethodIMP, "*@:");
return YES;
} else {
return NO;
}

}

NSString* dynamicMethodIMP(id self,SEL _cmd) {
return @"OK!";
}

@end

and get a:

"class_addMethod was not declared in this scope"

I tried for a few hours to debug this, but I am puzzled...
any ideas?
_______________________________________________

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

  • Follow-Ups:
    • Re: dynamic resolution
      • From: ronaldoussoren <email@hidden>
    • Re: dynamic resolution
      • From: Rafael Cerioli <email@hidden>
  • Prev by Date: Re: Notification of file system modification arrives too early?
  • Next by Date: Re: dynamic resolution
  • Previous by thread: Disabling scrolling while showing a floating window
  • Next by thread: Re: dynamic resolution
  • Index(es):
    • Date
    • Thread