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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 09-04-2008, 06:03 PM   #1 (permalink)
NewiPhoneDeveloper
Registered Member
 
Join Date: Jul 2008
Posts: 459
Default NSMutableArray "replace object at index" problem

Hello,

In my latest project I'm using an NSMutableArray, but when I try to replace an object the app crashes (TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION).

Code:
- (void)ThisFunctionReplacesAnObject {
    [nameOfMyArray replaceObjectAtIndex:0 with Object: @"newObject.png"];
}
The NSMutableArray is declared in the .h file and released in .m (dealloc method).

What am I doing wrong here?

Thanks in advance
NewiPhoneDeveloper is offline   Reply With Quote
 

» Advertisements
» Online Users: 728
18 members and 710 guests
anshuk1219, Domele, gascertificate, her-ur, Inupgames, iphone.savvy, jimmie6loa, kampftrinker, mapiko, nidie, oceanlablight, ratheesh, soonw29, srishtimehta, superblooddrainer, Yuvaraj.M, zbynda
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,825
Threads: 89,207
Posts: 380,637
Top Poster: BrianSlick (7,129)
Welcome to our newest member, srishtimehta
Powered by vBadvanced CMPS v3.1.0

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