I have class like the following
@interface Node : NSObject {
NSString* description;
NSString* ae;
NSString* ip;
NSString* port;
}
@property ( nonatomic , retain ) NSString* description;
@property ( nonatomic , retain ) NSString* ae;
@property ( nonatomic , retain ) NSString* ip;
@property ( nonatomic , retain ) NSString* port;
@end
#import "Node.h"
@implementation Node
@synthesize description,ae,ip,port;
@end
I want to create nsmutablearray of it So I do the following
NSMutableArray* nodesArray ;
nodesArray = [[NSMutableArray alloc] init];
Node * insertedNode =[[Node alloc]init] ;
insertedNode.description =@"test";
insertedNode.ae =@"test" ;
insertedNode.ip =@"test";
insertedNode.port =@"test";
[nodesArray addObject: insertedNode] ;
[insertedNode release];
then I print the count using
NSLog(@"%d",[nodesArray count] ) ;
but it always always return 0
any suggestion to solve that
Best regards
NSLog(@"%@", nodesArray)and tell us what you get.