• 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
Re: - resolveInstanceMethod:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: - resolveInstanceMethod:


  • Subject: Re: - resolveInstanceMethod:
  • From: Ariel Feinerman <email@hidden>
  • Date: Wed, 15 Dec 2010 00:40:13 +0200

Thank you, this is well so I can implement Cocoa methods from 10.6 and if
app is running on earlier version one will be resolved otherwise there will
be nothing

2010/12/14 Kyle Sluder <email@hidden>

> On Tue, Dec 14, 2010 at 1:15 PM, Ariel Feinerman <email@hidden>
> 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
>



--
best regards
Ariel
_______________________________________________

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

References: 
 >- resolveInstanceMethod: (From: Ariel Feinerman <email@hidden>)
 >Re: - resolveInstanceMethod: (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: How to read a text file over a network
  • Next by Date: Re: Core Data: Error while saving. Multiple validation errors occurred.
  • Previous by thread: Re: - resolveInstanceMethod:
  • Next by thread: Call for People: CocoaHeads Silicon Valley
  • Index(es):
    • Date
    • Thread