On Tue, Dec 14, 2010 at 1:15 PM, Ariel Feinerman <arielfap...@gmail.com> wrote:
> Hi,
>
> will its selector be in resolveInstanceMethod:, if method exist? I want to
> implement some Cocoa methods for earlier  ;

Are you asking if -resolveInstanceMethod: is called for methods that
have implementations at compile time? If that is your question, the
answer is no.

// BEGIN FILE LISTING

#import <Foundation/Foundation.h>

@interface Foo : NSObject
- (void)aMethod;
@end

@implementation Foo
- (void)aMethod {
  NSLog(@"aMethod called");
}

+ (BOOL)resolveInstanceMethod:(SEL)aSelector {
  NSLog(@"resolving %@", NSStringFromSelector(aSelector));
  return [super resolveInstanceMethod:aSelector];
}
@end

int main(int argc, char **argv) {
  [NSAutoreleasePool new];
  [[Foo new] aMethod];
  return 0;
}

// END FILE LISTING

% /Developer/usr/bin/clang -o /tmp/resolve /tmp/resolve.m -framework Foundation
% /tmp/resolve

2010-12-14 13:36:19.577 resolve[2314:903] aMethod called

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to