• 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: Invoking the superclass from a private method correctly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invoking the superclass from a private method correctly


  • Subject: Re: Invoking the superclass from a private method correctly
  • From: j o a r <email@hidden>
  • Date: Thu, 3 Feb 2005 18:47:46 +0100


On 2005-02-03, at 18.39, Nick Zitzmann wrote:

I have a project that has several private methods, and some of these private methods exist in concrete subclasses that need to call the private method in the superclass. I could just write [super someMethod], but the compiler complains about that because the method isn't defined anywhere.

I guess it comes down to how important it is to "hide" the protected methods. If your primary concern is that you want to communicate an usage guideline I would suggest that you simply use a (Protected) category in the header file for methods shared with subclasses. Add a comment on what the purpose of the category is. If you're on the other hand creating some sort of framework where you want to be more certain that the inner workings stay a secret (besides for people using class-dump of course), then you might use a separate header file that's imported by your subclasses in the same way.


At least I think that this would be better than twiggling with objc_msgSend et. al.

j o a r

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

References: 
 >Invoking the superclass from a private method correctly (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: NSDocument setFileName - File Must Exist?
  • Next by Date: Re: Invoking the superclass from a private method correctly
  • Previous by thread: Invoking the superclass from a private method correctly
  • Next by thread: Re: Invoking the superclass from a private method correctly
  • Index(es):
    • Date
    • Thread