• 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: Calling original functions from overriding Category functions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling original functions from overriding Category functions


  • Subject: Re: Calling original functions from overriding Category functions
  • From: "b.bum" <email@hidden>
  • Date: Thu, 18 Mar 2004 13:29:43 -0800

On Mar 18, 2004, at 10:38 AM, Ondra Cada wrote:
I've never tried for myself, but there may be way, by using Objective-C
low-level runtime functions like:

well, somebody please correct me if I am wrong, but IIRC, category functionality is (used to be?) implemented by the category implementation actually *replacing* the original one in the class tables. Therefore (and unless I am wrong), no luck.

Right.

Either cache the IMP before you load the category....

.... or override the method in a subclass and use +poseAsClass:.

From within a method overridden through posing, [super method...] will invoke the original implementation.

There are advantages and disadvantages to going either route.
_______________________________________________
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: 
 >Re: Calling original functions from overriding Category functions (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: customizing visual feedback in nstableview
  • Next by Date: Re: Nib files checked out of Subversion are read-only
  • Previous by thread: Re: Calling original functions from overriding Category functions
  • Next by thread: LoginWindow and graphic daemons in the startup context
  • Index(es):
    • Date
    • Thread