You could expect to see zero/nil values returned from object properties if the object pointer is nil. Adding

NSLog(@"%p", fooObj);

would tell you if that's the case.

Also, I'm not sure how your question relates to NSMutableArray since, at least in your code snippet, you don't do much with it.


On Feb 15, 2010, at 1:53 AM, mart...@telia.com wrote:

Is there a way to display/view data inside an Arraylist.
trying to use:

RandomObj *fooObj = [[RandomObj alloc]init];

NSEnumerator *enumerator = [fooArray objectEnumerator];
 id obj;
 while ( obj = [enumerator nextObject] ) {
 NSLog( @"%@", obj);
 NSLog( @"%d", fooObj.id);
 NSLog( @"%@", fooObj.name);
}

I get memory slots + values when im runing this from same method as the imported data from a sqliteDB. But when im calling the same Object but from example in Appdelegate (where i have the arraylist) i get the memory slot but
values in id and name become 0 and null.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to