• 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: Enhancing external (system) objects with new features (trapping messages)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Enhancing external (system) objects with new features (trapping messages) (From: Stefan Pantke <email@hidden>)

  • Prev by Date: Re: libraries
  • Next by Date: Re: Forum for advanced Cocoa questions
  • Previous by thread: Enhancing external (system) objects with new features (trapping messages)
  • Next by thread: Installing SMySQL
  • Index(es):
    • Date
    • Thread