iphone - How do I populate an NSMutableArray in one class with another object? -
i know simple answer, can't seem find solution. created object in own class , trying populate data class. simple data types nsstring, have no problem, when trying make nsmutablearray equal nsmutablearray or when try populate nsmutablearray objects (like strings), keep getting exception errors...
here object trying populate:
#import <foundation/foundation.h> @interface rssfeedlist : nsobject { nsstring *subject; nsmutablearray *rssfeeddetail; } @property (nonatomic, retain) nsstring *subject; @property (nonatomic, retain) nsmutablearray *rssfeeddetail; @end
this how able populate nsstring 'subject' in class:
rssfeedlist.subject = @"test";
however, if follow similar convention within same class respect array, throws exception:
rssfeedlist.rssfeeddetail = rssitemdetailarray;
where rssitemdetailarray nsmutablearray have built in same class.
i have tried add items (i tried strings testing) nsmutablearray directly no avail:
[rssfeedlist.rssfeeddetail addobject:@"test"];
any ideas?? in advance!!
i'm you've forgotten synthesize rssfeeddetail.
Comments
Post a Comment