• 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: "Jonathan 'Wolf' Rentzsch" <email@hidden>
  • Date: Thu, 18 Mar 2004 12:33:48 -0600

Kevin Ballard, email@hidden, wrote:
>When you subclass a class and override one of the superclass's
>functions, you can still call the function with [super myMessage].
>However, when you use a Category and override one of the functions in
>the Category class, is there any way to call the original function?

_Cocoa Programming_ has blurb on how to do this. The book's not with me,
and I can't recite the actual working code off the top of my head. It's
something like discover the method's IMP, *then* load the Category, so
then it can call-through.

| Jonathan 'Wolf' Rentzsch http://rentzsch.com
| Red Shed Software http://redshed.net
| "better" necessarily means "different"
_______________________________________________
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.


  • Prev by Date: Re: converting between strings, NSCalendarDates and back again
  • Next by Date: Re: Calling original functions from overriding Category functions
  • Previous by thread: LoginWindow and graphic daemons in the startup context
  • Next by thread: NSTableView setUsesAlternatingBackgroundColors:TRUE not working for added columns?
  • Index(es):
    • Date
    • Thread