Hi
I wrote a class that stores data common to all instances in an, init file, but
when I create new instances, + (void) initialize isn't getting called. I
thought that initialize was always called before anything else, so am a but
confused why it isn't working. I don't want to create a global
On Sun, Jul 24, 2011 at 3:33 PM, Ken Tozier kentoz...@comcast.net wrote:
I wrote a class that stores data common to all instances in an, init file,
but when I create new instances, + (void) initialize isn't getting called.
I can't tell for sure from your email, but it seems like you might
.
--Andy
On Jul 24, 2011, at 3:33 PM, Ken Tozier wrote:
Hi
I wrote a class that stores data common to all instances in an, init file,
but when I create new instances, + (void) initialize isn't getting called. I
thought that initialize was always called before anything else, so am
...@comcast.net wrote:
I wrote a class that stores data common to all instances in an, init file,
but when I create new instances, + (void) initialize isn't getting called.
I can't tell for sure from your email, but it seems like you might be
expecting initialize to be called whenever you create
, + (void) initialize isn't getting called. I
thought that initialize was always called before anything else, so am a but
confused why it isn't working. I don't want to create a global initialized
flag and have to check that inside every method. Here's a stripped down
version of the initialize
On Jul 24, 2011, at 12:59 PM, Andy Lee wrote:
Another thought -- is it possible you have a subclass of DBWord that
implements +initialize and needs to call super?
+initialize methods shouldn’t call super. The runtime sends the message
separately to each class in the hierarchy.
As to the
Thanks all. I figured out what I was doing wrong. I was expecting a higher
level class (DBString) to call a DBWord method, when it bypasses DBWord
altogether if it has shared data of it's own.
If I delete all shared data, initialize is called correctly.
On Jul 24, 2011, at 5:02 PM, Jens Alfke