Re: Method Sees Populated Array As Empty
Re: Method Sees Populated Array As Empty
- Subject: Re: Method Sees Populated Array As Empty
- From: Matt Neuburg <email@hidden>
- Date: Sat, 05 Jul 2008 15:53:35 -0700
- Thread-topic: Method Sees Populated Array As Empty
On Sat, 5 Jul 2008 22:36:07 +0100, Mark Wales <email@hidden>
said:
>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.
Perhaps you are not referring to the actual arrayOfReferences. I presume
arrayOfReferences is an ivar? Then maybe there is something wrong with your
accessors or your memory management. Use debugging or logging to check that
this is really the object you think it is. Since you don't show any code,
it's hard to say more. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden