• 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
Calling a class's methods from within it's +(void)initialize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Calling a class's methods from within it's +(void)initialize
      • From: Chris Kane <email@hidden>
    • Re: Calling a class's methods from within it's +(void)initialize
      • From: Greg Hurrell <email@hidden>
  • Prev by Date: Re: How do I write a fetch request that will get the entity with the max value?
  • Next by Date: NSSegmentedControl Highlights
  • Previous by thread: Re: Custom line breaking in NSTextView
  • Next by thread: Re: Calling a class's methods from within it's +(void)initialize
  • Index(es):
    • Date
    • Thread