Calling a class's methods from within it's +(void)initialize
Calling a class's methods from within it's +(void)initialize
- Subject: Calling a class's methods from within it's +(void)initialize
- From: email@hidden
- Date: Tue, 2 Aug 2005 14:11:30 +1000
Yeah, so, subject is the question - is it safe to do this?
Experimentally it seems to work fine, and there's been a thread or
two on singletons which have demonstrated this occurring, but, no one
has directly addressed the validity of doing this (that I've been
able to find; the archive search on lists.apple.com doesn't allow for
literal searches, which makes this topic hard to narrow down).
In a nutshell I have a class which has a few default instances for
various purposes, and I want to provide default versions of these.
Because they can be set by users of the class, and can be set to nil,
I can't lazily create them in their appropriate getters... not
without extra cruft, anyway.
And why does MacOS X's dictionary not have "cruft" in it? Who wrote
this thing?!?
Wade Tregaskis (AIM/iChat, Yahoo & Skype: wadetregaskis, ICQ:
40056898, MSN: email@hidden, AV iChat & email:
email@hidden, Jabber: email@hidden)
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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