Re: Weird problem with writeToUrl:ofType:error
Re: Weird problem with writeToUrl:ofType:error
- Subject: Re: Weird problem with writeToUrl:ofType:error
- From: Jean-Nicolas Jolivet <email@hidden>
- Date: Fri, 16 Nov 2007 04:15:08 -0500
Something strange I just noticed...when I launch my application, 2
instances of MyDocument are created... (I've used NSLog(@"MyDocument
init") in MyDocument's init method..)
Is this normal? Because it would definitely explain my problem... A
different instance of MyDocument is being saved somehow... now idea how
it could've happened...
Jean-Nicolas Jolivet wrote:
Using the following:
NSLog(@"Debug Count: %d, Object: %@", [subtitles count], subtitles);
Both when saving, and when adding/deleting stuff from the array... I
was able to see that the addresses of the objects in my array are
different...so it really is a different instance... Now the thing is..
how could this happen!.. My code is pretty simple and straightforward
and should all be using the same instance variable (the Mutable Array)
that belongs to the MyDocument class... it's as if a different
instance of MyDocument was actually doing the saving... how is this
possible?
Shawn Erickson wrote:
On 11/15/07, Jean-Nicolas Jolivet <email@hidden> wrote:
Any help would be appreciated!
It sure sounds like you are using different array instances. Use the
debugger to view address of the array when you modify/access it to
understand if and how that is happening.
Don't think we can help much without a sample of code (ideally enough
to reproduce the problem).
-Shawn
_______________________________________________
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
_______________________________________________
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