• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MutableArrays losing its contents?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MutableArrays losing its contents?


  • Subject: Re: MutableArrays losing its contents?
  • From: Lee Morgan <email@hidden>
  • Date: Mon, 1 Dec 2003 21:54:58 -0500

On Dec 1, 2003, at 9:20 PM, Lee Morgan wrote:

Well, your exactly right - I did some extra check and the array I'm adding into is getting and keeping its contents its just for some reason I'm getting a second instance of the SAME array in the other method. But I have no idea why this is happening... My array is global to the class and I only alloc and init it one time in my initWithFrame method.

Well, I've gone about it a twisted way and fixed it...
I instantiated a NSMutableArray in InterfaceBuilder, then hooked it up to my view as a outlet and now it works fine...
BTW I went over the code with a fine comb and found that the import method (linked to a menu item) was some how getting a new instance of the array - why I still don't know... and this isn't exactly my ideal fix for this problem but I guess if it works it works.

Thanks to all for the help... And if anyone knows how to fix this with declaring the array in the source instead of in IB then I would be grateful (just so I know how to fix it if it comes up again).

Thanks again.

Lee Morgan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: MutableArrays losing its contents?
      • From: Clark Cox <email@hidden>
References: 
 >Re: MutableArrays losing its contents? (From: Lee Morgan <email@hidden>)
 >Re: MutableArrays losing its contents? (From: Clark Cox <email@hidden>)
 >Re: MutableArrays losing its contents? (From: Lee Morgan <email@hidden>)

  • Prev by Date: Strange NSStatusItem Bug
  • Next by Date: Re: MutableArrays losing its contents?
  • Previous by thread: Re: MutableArrays losing its contents?
  • Next by thread: Re: MutableArrays losing its contents?
  • Index(es):
    • Date
    • Thread