(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 on this files header as:
NSMutableArray *arquivos;
[abre abreBrowser]
indeed returns a NSArray
.
My problem is [arquivos addObjectsFromArray:arquivosRecebe];
doesn't work.
I also tried addObject
and it gives me the same result, i.e. nothing.
When I feed arquivos like this:
arquivos = [abre abreBrowser];
it works.
But when I do a [arquivos addObject:Object]
or [arquivos addObjectsFromArray:NSArray]
it doesnt feeds my NSMutableArray
arquivos.
Can someone tell me what I'm doing wrong?
It appears that you are not allocating arquivos anywhere in your object's initialization before actually sending the addObjectsFromArray message to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With