On 15 Dec 2014, at 13:42, Jean-Daniel Dupas <mail...@xenonium.com> wrote: >> Apart from completely re-thinking his approach. E.g. NSImageRep, AFAIK, >> simply has each image representation subclass add itself to an NSArray from >> its +initialize method. I'd think that'd be less fragile than walking the >> entire class list. > > I fully agree on that. Relying on class iteration is generally a design flaw. > It is too fragile to be used in a reliable and futur proof way. > But I don’t think you can rely on +initialize to register subclasses as > initialize will not be called until the someone try to use the target class > (or one of it’s subclass).
Doh! You're right! I mixed up +initialize and +load here. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com