Hello,

I'm trying to get a document based app to save the contents of an array (NSMutableArray *arrayOfReferences) that is declared and initialised in the MyDocument.m. Whenever any method in MyDocument.m or other classes tries to access the arrayOfReferences it has no problems and everything works fine, except for when I use the

- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError

method to save. I've put an NSLog("%@", arrayOfReferences) at the beginning of this method and the array comes out as empty, even though with every other method it is populated as it should be. This means I can't get to its contents in order to save it (it just saves the empty array - all the objects it contains implement NSCoding properly, but the problem is before any coding even happens, the method sees the array as empty).

Is there any reason why a method would read an array as empty when every other method has no problems accessing it? I can't work it out and it's really annoying: should have only taken a few minutes to implement save.

Thanks in advance for any help,

Mark
-----------------------------------------------------------------------
Home: [EMAIL PROTECTED]
Blog: http://neo-sophistry.blogspot.com/
-----------------------------------------------------------------------
_______________________________________________

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