Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Kevin Callahan <email@hidden>
- Date: Sat, 24 Aug 2002 13:45:57 -0700
On Saturday, August 24, 2002, at 01:15 PM, Onar Vikingstad wrote:
I have a problem with this line of code:
NSArray *arrayOfUser = [[[NSMutableArray alloc] initWithCapacity:2]
arrayWithObjects:[string componentsSeparatedByString:@":"], nil];
you're calling an NSArray class method +arrayWithObjects: on an
instance of NSMutableArray.
You might want to use the NSMutableArray instance method
-(void)addObjectsFromArray:(NSArray *)otherArray
NSArray *arrayOfUser =[[[NSMutableArray alloc] initWithCapacity:2]
addObjectsFromArray: [string componentsSeparatedByString:@":"]];
Kevin
[string self] is in this example just dsad:FAFI.F6b3H1OU and when I
run this line, I get:
2002-08-24 22:06:16.639 Apache Protect[1031] *** -[NSCFArray
arrayWithObjects:]: selector not recognized
2002-08-24 22:06:16.654 Apache Protect[1031] *** -[NSCFArray
arrayWithObjects:]: selector not recognized
What is wrong here? Why isn't the array created?
Kind regards,
newbie...
--
Onar Vikingstad - email@hidden
http://www.vikingstad.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
- Kevin
o#?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >(no subject) (From: Onar Vikingstad <email@hidden>) |