• 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: obj-c: how do i call an instance method in my super's super?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: obj-c: how do i call an instance method in my super's super?


  • Subject: Re: obj-c: how do i call an instance method in my super's super?
  • From: Ian Anderson <email@hidden>
  • Date: Wed, 21 Sep 2005 18:00:15 -0700

Maybe I'm missing something here, but if subClassOfBaseClass doesn't implement foobar, then when you say [super foobar] in - [subClassOfSubClassOfBaseClass foobar], it will go up the chain to baseClass's implementation of foobar. Yes?

Ian


given class structure:

baseClass
subClassOfBaseClass
subClassOfSubClassOfBaseClass

and each of these classes has an instance method foobar. how can i call baseClass's foobar from within subClassOfSubClassOfBaseClass's foobar?

for the time being, i've put a "proxy" method in subClassOfBaseClass that simpl;y calls baseClass's foobar and i call this "proxy" method from foobar in subClassOfSubClassOfBaseClass. but it seems that there aught to be a more direct approach (without having to talk directly to the runtime code).

thanx,
ken

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: obj-c: how do i call an instance method in my super's super?
      • From: Ricky Sharp <email@hidden>
References: 
 >obj-c: how do i call an instance method in my super's super? (From: Ken Victor <email@hidden>)

  • Prev by Date: Re: How do I create a file name with a "/" in it?
  • Next by Date: Re: removing NSManagedObject: a conceptual bug in my app
  • Previous by thread: obj-c: how do i call an instance method in my super's super?
  • Next by thread: Re: obj-c: how do i call an instance method in my super's super?
  • Index(es):
    • Date
    • Thread