Array passing between classes, gone?

Posted by Kenneth on Stack Overflow See other posts from Stack Overflow or by Kenneth
Published on 2010-06-17T09:51:10Z Indexed on 2010/06/17 9:53 UTC
Read the original article Hit count: 206

Filed under:

Hey guys . i have two classes, SelectionScreenTable & GraphView.

In the SelectionScreenTable class .h, i declared a NSMutableArray called usagedatas

NSMutableArray *usagedatas;

} @property (nonatomic, retain) NSMutableArray *usagedatas; In the SelectionScreenTable class.m i remembered to @synthesize. Later on, while processing my methods, i did a

NSLog(@"usagedatas count:%i",usagedatas.count);

to check whether it has value and it returned 1. so yeah its good up to this point.

And in the -(void) dealloc , i remembered to released it .

[usagedatas release];

So now comes ME trying to use it in another class.

In GraphView.m i imported the "SelectionScreenTable.h". in the -(void)viewDidLoad i did

SelectionScreenTable *UD = [SelectionScreenTable alloc];

 NSLog(@"GraphView UD.usagedataas.count =  :%i",UD.usagedatas.count);

it returned 0.

Any idea guys?

© Stack Overflow or respective owner

Related posts about iphone