Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 09-05-2008, 08:30 AM   #8 (permalink)
cleverapps
Registered Member
 
Join Date: Jul 2008
Posts: 11
cleverapps is on a distinguished road
Default

Quote:
Originally Posted by NewiPhoneDeveloper View Post
Hi,

I tried what you suggested and it really makes sense to me, but still "TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION".

Here is what I did:

Code:
//this is MainViewController.m (NSMutable array is already declared in .h)

myNSMutableArray = [[[NSMutableArray alloc] initWithObjects:@"object1.png", @"object2.png", @"object3.png"]retain];

- (void)ReplaceOneOfMyObjects {
    [myNSMutableArray replaceObjectAtIndex:0 withObject:@"object4.png"];
}

[self ReplaceOneOfMyObjects];
"nil" is missing:

Code:
myNSMutableArray = [[NSMutableArray alloc] initWithObjects: @"object1.png", @"object2.png", @"object3.png", nil];
cleverapps is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,482
Threads: 94,040
Posts: 402,627
Top Poster: BrianSlick (7,978)
Welcome to our newest member, beginningiosdev
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:47 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.