Re: SEL's
Re: SEL's
- Subject: Re: SEL's
- From: Andreas Monitzer <email@hidden>
- Date: Mon, 24 Sep 2001 18:26:59 +0200
On Monday, September 24, 2001, at 05:55 , Robert S Goldsmith wrote:
on a similar note to the NSRect array problem, I have an array of
Selectors that needs to be configured once at the start of the program
but not changed after that. It also needs to be available to every
instance of a class.
Currently, I have a statically defined pointer defined in the same source
file as the class (so the class instances can all access it) and then the
first instance of the class to be created takes on the role of creating
and maintaining a normal C array. This works atm but that is only because
i can be sure that when this instance is destroyed, all instances are
destroyed. This will not always be the case. Can someone suggest a better
way?
Initialize the array in
+ (void)initialize;
This class method will be automatically called on first access.
And never destroy it (it will be cleaned up at program exit).
andy
--
Discussion forthcoming.
References: | |
| >SEL's (From: Robert S Goldsmith <email@hidden>) |