FROM : objectwerks inc
DATE : Sat May 10 18:32:31 2008
On May 9, 2008, at 9:44 PM, Matt James wrote:
> Is there any way to overload a class in such a manner as to print
> out every
> method call it makes at any given time before it runs the method?
> Right
> now, I'm overloading a few methods of this particular class and
> putting
> NSLog's at the first line, but I was wondering if there was a way to
> jump in
> before _ALL_ methods on an object and perform this particular task.
> Thanks for any help!
See if you can do anything with -messageSignatureForSelector:(SEL) and
-forwardInvocation: and that family of stuff as defined on NSObject.
You may be able to figure something out there. It has been a while
since I did anything with it but there are hooks that maybe you can
use to find out what is going to be called and do your thing then
Chad
>
>
> -Matt
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
DATE : Sat May 10 18:32:31 2008
On May 9, 2008, at 9:44 PM, Matt James wrote:
> Is there any way to overload a class in such a manner as to print
> out every
> method call it makes at any given time before it runs the method?
> Right
> now, I'm overloading a few methods of this particular class and
> putting
> NSLog's at the first line, but I was wondering if there was a way to
> jump in
> before _ALL_ methods on an object and perform this particular task.
> Thanks for any help!
See if you can do anything with -messageSignatureForSelector:(SEL) and
-forwardInvocation: and that family of stuff as defined on NSObject.
You may be able to figure something out there. It has been a while
since I did anything with it but there are hooks that maybe you can
use to find out what is going to be called and do your thing then
Chad
>
>
> -Matt
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
| Related mails | Author | Date |
|---|---|---|
| Matt James | May 10, 05:44 | |
| Christiaan Hofman | May 10, 13:11 | |
| Jonathon Mah | May 10, 15:49 | |
| objectwerks inc | May 10, 18:32 | |
| Bill Bumgarner | May 10, 19:48 | |
| Gerd Knops | May 10, 20:34 | |
| Scott Little | May 10, 23:34 | |
| Stéphane Corthésy | May 11, 11:53 | |
| Matt James | May 11, 15:33 | |
| objectwerks inc | May 12, 01:45 | |
| Scott Little | May 12, 13:02 | |
| Carlos Salinas | May 12, 18:08 |






Cocoa mail archive

