Hello,

I'm trying to do this:


int p;


        NSMutableArray * arregloNumeros = [[NSMutableArray alloc] init]; 
        NSString * fileContents = [NSString 
stringWithContentsOfFile:@"lineasFinal.txt"]; 
        NSEnumerator * lineFileEnumerator = [[fileContents 
componentsSeparatedByString:@"|"] objectEnumerator]; 
        NSString * enumeratedFileLine; 
        // Prepare to process each line of numbers 
        NSEnumerator * numberEnumerator; 
        NSString * numberAsString; 
                while (enumeratedFileLine = [lineFileEnumerator nextObject]) 
                { 
                numberEnumerator = [[ enumeratedFileLine 
componentsSeparatedByString:@","] objectEnumerator]; 
                        while (numberAsString = [numberEnumerator nextObject])
                        { 
                                // Change string to float
                                float auxFloat = [numberAsString floatValue];


                                [arregloNumeros addObject:[NSString 
stringWithFormat:@"%f", auxFloat]]; 
                                        
                        } 
                        
                        //[arregloNumeros release];
                        
                        for (p = 0; p < 7; p++)
                        NSLog(@"Elemento %d en el arreglo numeros es: %@", p, 
[arregloNumeros objectAtIndex:p]);


                        [arregloNumeros release];
                }


        But when I run the program in my log window appears the following 
message:


         -[NSCFArray addObject:]: mutating method sent to immutable object


        Does anyone know what is going on? and help me to fix it please.




Thanks in advance.
Priscila Jardón
_________________________________________________________________
Découvrez toutes les possibilités de communication avec vos proches
http://www.microsoft.com/windows/windowslive/default.aspx_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to