On Mon, Nov 17, 2008 at 7:14 AM, Greg Robertson <[EMAIL PROTECTED]> wrote:
> I have a couple of simple ivar arrays:
>
> NSString *myString[4];
> NSInteger myInteger[4];
>
> How can I @synthesize these so I can access them with simple dot notation:
I'm not sure that you can. However, this should get you the interface
that you want:
@interface MyClass :NSObject {
NSString *myString[4];
NSInteger *myInteger[4];
}
@property (readonly) NSString **myString;
@property (readonly) NSInteger *myInteger;
@end
@implementation MyClass
-(NSString**)myString {
return myString;
}
-(NSInteger*)myInteger {
return myInteger;
}
@end
>
> ie. self.myInteger[2] = 100;
>
> I have tried several ways to set them up in the @interface but I keep
> getting compile errors. Could someone show me the proper @property or
> is this not possible?
>
> I would prefer to avoid NSArray if I can.
--
Clark S. Cox III
[EMAIL PROTECTED]
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]