Re: Enhancing external (system) objects with new features (trapping messages)
Re: Enhancing external (system) objects with new features (trapping messages)
- Subject: Re: Enhancing external (system) objects with new features (trapping messages)
- From: Ralph Pöllath <email@hidden>
- Date: Mon, 21 Jul 2003 11:54:57 +0200
You might want to take a look at this:
http://cocoadev.com/index.pl?MethodSwizzling
This will only work in the current application, but you could write an
input manager to load you code into all (Cocoa?) apps.
HTH,
-Ralph.
Suppose, there is some system objet accessible from ObjC SomeObj.
Then suppose, this object replies to some build-in message [doit
withData:*].
Is it possible to change the behaviour of object SomeObj and add
some new methods, which are not only accessible from one/my
application, but from any application?
Furthermore: May I trap some build-in method and replace it with my own
code to enhance it's functionality?
Something like:
- (NSArray*) doIt: (NSArray*) withData : {
/*
* do my own code
*/
/*
* call the original method
*/
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.