(IBAction)adicionarPastas:(id)sender { AbreBrowser *abre = [[AbreBrowser alloc] init]; NSMutableArray *arquivosRecebe = [[NSMutableArray alloc] initWithArray:[abre abreBrowser]]; [abre release]; [arquivos addObjectsFromArray:arquivosRecebe]; [arquivosTableView reloadData]; [arquivosTableView setDataSource:self]; }
Well, arquivos is declared in this file header as:
NSMutableArray *arquivos;
[abre abreBrowser] really returns a NSArray .
My problem is [arquivos addObjectsFromArray:arquivosRecebe]; does not work. I also tried addObject and it gives me the same result, i.e. Nothing.
When I feed arquivos as follows:
arquivos = [abre abreBrowser];
it works. But when I do [arquivos addObject:Object] or [arquivos addObjectsFromArray:NSArray] , it does not pass my arquivos NSMutableArray .
Can someone tell me what I'm doing wrong?
source share