• 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: + initialize docs conflict?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: + initialize docs conflict?


  • Subject: Re: + initialize docs conflict?
  • From: "Buck, Erik (Space Technology)" <email@hidden>
  • Date: Tue, 1 Feb 2005 06:59:37 -0800
  • Thread-topic: Re: + initialize docs conflict?

In Objective-C, class methods are inherited and run-time messaging to class methods is in fact polymorphic.  Yes "super" is available and meaningful in class methods.

I believe the issue with a single +initialize implementation being called multiple times is the following:

The run-time sends the +initialize message to each class once.  However, if the class does not implement the +initialize method, an inherited implementation is called.

For example, NSControl is a subclass of NSView.
The runtime sends the +initialize message to NSView.
Then the runtime sends the +initialize message to NSControl.

If NSControl does not implement +initialize, then the NSView implementation of +initialize gets called by the run-time twice: Once for NSView and once for NSControl because NSControl inherited the NSView implementation.
 _______________________________________________
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: + initialize docs conflict?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Drag from iTunes
  • Next by Date: Re: Cocoa and full-screen GL
  • Previous by thread: Re: + initialize docs conflict?
  • Next by thread: Re: + initialize docs conflict?
  • Index(es):
    • Date
    • Thread