Re: Increment object property

2008-10-22 Thread Charles Steinman
--- On Wed, 10/22/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Newbie question, Is it possible to have an object property > that > increments everytime an object is instantiated? Simplest solution: Just increment a static int and insert that into your string. Fancy it up as appropriate t

Re: Increment object property

2008-10-22 Thread Keary Suska
On Oct 22, 2008, at 2:10 PM, [EMAIL PROTECTED] wrote: Newbie question, Is it possible to have an object property that increments everytime an object is instantiated? You can have a static variable defined in the implementation file, and it will be persistent across the class, but will be i

Increment object property

2008-10-22 Thread gumboots
Newbie question, Is it possible to have an object property that increments everytime an object is instantiated? @interface foo : NSObject { NSString*name; } @property (copy,readwrite) NSString *name; @end #import "foo.h" @implementation foo - (id) init { self = [super i