Re: + initialize docs conflict?
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