• 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: call super class method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: call super class method


  • Subject: Re: call super class method
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 21 Dec 2005 19:41:24 +0100

William,

On 21.12.2005, at 18:42, William Turner wrote:

Is there a way in Objective C to invoke - from outside the class - the base class method rather than the subclass?
In other words, I'm not talking about using the "super" keyword inside the class.

Yup: get the IMP from the (super)class and call it directly with the target object.

Beware, though, that it breaks encapsulation and may thus lead to grave and hard-to-find problems.

Alternatively, is there a way to prevent subclasses from overriding methods in the base class?

Nope.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


_______________________________________________
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
References: 
 >call super class method (From: William Turner <email@hidden>)

  • Prev by Date: Re: Authenticating multiple Installers with one prompt
  • Next by Date: Files larger than 2.9 gigs
  • Previous by thread: call super class method
  • Next by thread: Re: call super class method
  • Index(es):
    • Date
    • Thread