On 6 Jul 2008, at 8:29 am, Mark Wales wrote:

@interface MyDocument : NSDocument
{
        ....
        ....
        NSMutableArray *arrayOfReferences;
}



NSLog(@"%@", [self arrayOfReferences]); // <== Shows the array as empty



Do you actually have an accessor method for arrayOfReferences? If not, referring to the ivar using [self arrayOfReferences] isn't correct. The fact it appears to work in some cases may be a blind fluke.

You need a method:

- (NSArray*)    arrayOfReferences
{
        return arrayOfReferences;
}

or just refer directly to the ivar:

NSLog(@"%@", arrayOfReferences);




hth,


Graham
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to