Re: When do NSImageRep subclasses register themselves?
Re: When do NSImageRep subclasses register themselves?
- Subject: Re: When do NSImageRep subclasses register themselves?
- From: Chaz McGarvey <email@hidden>
- Date: Thu, 1 Apr 2004 14:59:14 -0700
On Apr 1, 2004, at 9:52 AM, lbland wrote:
On Apr 1, 2004, at 11:02 AM, Kevin Ballard wrote:
Is this true? Can you assume in a subclass's +load that its super has
already loaded?
from the NSObject docs:
"The order in which classes are loaded is also not guaranteed, to the
point that superclasses arent even guaranteed to be loaded before all
of their subclasses. Because you cant rely on other classes being
loaded at the point when your class is sent a load message, you should
be extremely careful when sending messages to other classes from
within your load method."
Yes, exactly. That's the thing that makes me wonder how these
subclasses are registering themselves. The reason I care enough to ask
is because I'm interesting in designing some of my own classes for
loading a different type of file in a similar fashion to how the
NSImageRep system of class/subclasses works.
I thought that perhaps NSApplication registers them, but that doesn't
go along with my thoughts on how object-oriented code should work. Can
anyone else think of any other ways they might be doing this?
Thanks,
Chaz McGarvey
http://www.brokenzipper.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.