• 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: When do NSImageRep subclasses register themselves?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: When do NSImageRep subclasses register themselves? (From: Ondra Cada <email@hidden>)
 >Re: When do NSImageRep subclasses register themselves? (From: Chaz McGarvey <email@hidden>)
 >Re: When do NSImageRep subclasses register themselves? (From: Kevin Ballard <email@hidden>)
 >Re: When do NSImageRep subclasses register themselves? (From: lbland <email@hidden>)

  • Prev by Date: Re: Obtaining printer info
  • Next by Date: [ANN] F-Script 1.2.6 Released – Open-source interactive and scripting layer for Cocoa
  • Previous by thread: Re: When do NSImageRep subclasses register themselves?
  • Next by thread: Re: When do NSImageRep subclasses register themselves?
  • Index(es):
    • Date
    • Thread