Iphone NsMutableArray Count

Posted by Claudio on Stack Overflow See other posts from Stack Overflow or by Claudio
Published on 2010-03-22T12:07:01Z Indexed on 2010/03/22 12:11 UTC
Read the original article Hit count: 643

I have a struct SystemStruct *sharedStruct = [SystemStruct sharedSystemStruct]; implemented as a singleton, to share 3 Arrays.

the problem is that when i try to count the array's objects the system crash. es:

This code Crash:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

SystemStruct *SharedStruct = [SystemStruct sharedSystemStruct]; return SharedStruct.path.count; }

This Code Work:

SystemStruct *SharedStruct = [SystemStruct sharedSystemStruct];
NSLog(@"%d", SharedStruct.path.count);

How can i return the correct array count?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about nsmutablearray