Re: how to combine addObject with Object instantiation?
Re: how to combine addObject with Object instantiation?
- Subject: Re: how to combine addObject with Object instantiation?
- From: ANE <email@hidden>
- Date: Mon, 04 May 2009 22:13:49 +0200
Sorry. But this is the wrong list for this question. Use cocoa-dev
instead...
[myArray addObject:[NSString stringWithFormat:@"%@",@"test"]];
or (better)
[myArray addObject: @"test"];
or (more general)
[myArray addObject:[AClass initWithXYZ: blabla]];
Am 03.05.2009 um 21:53 schrieb Sandy Santra:
After
NSMutableArray *myArray = [NSMutableArray array];
Is there any way to combine these two lines:
NSString *myName = @"Joe";
[myArray addObject:myName];
into one line?
I keep thinking there's a way to use
[myArray addObject:[instantiation of some object]];
to add all types of objects to a mutable array, but can't seem to
figure out how to combine statements.
Thanks!
--Sandy Santra
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Dr. Volker Thieme
Rochlitzstraße 65
Leipzig
04229
Germany
volker.thieme_(at)_mac.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden