Indexed Accessors for arrays
Indexed Accessors for arrays
- Subject: Indexed Accessors for arrays
- From: Ricky Sharp <email@hidden>
- Date: Thu, 25 Nov 2004 09:51:44 -0600
I'm ensuring my objects are KVC compliant. Thanks to Kevin Callahan's
Accessorizer, this is going very smoothly.
However, I'm trying to figure out what to do with the following iVar:
NSString* imageNames [IIButtonImageCount];
where IIButtonImageCount is a constant (currently 6). This fixed-sized
array stores the names of the images to use for all states I allow for
my buttons. If a particular value is nil, that signals that the
particular state doesn't have an image in which case it reverts to
using some other state. For example, not all my buttons will have
"mouseover" images.
But isn't it a case where I cannot create indexed accessors for
imageNames as it isn't one of the collection classes (e.g. NSArray)?
And, while I don't currently have ivars like this:
float someAttribute [SomeConstant];
Would that also have to be changed to say an NSArray containing
NSNumbers?
How do others handle writing accessors for fixed-size arrays?
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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