• 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: NSMutableArray-can't add objects of my class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableArray-can't add objects of my class


  • Subject: Re: NSMutableArray-can't add objects of my class
  • From: Andy Lee <email@hidden>
  • Date: Mon, 3 Jul 2006 00:19:39 -0400

On Jul 3, 2006, at 12:01 AM, Rex Fernando wrote:
I created an NSMutableArray like this:
_notes = [[NSMutableArray alloc] init];

and I am trying to add objects of my own class to it. There is no error message, but the array remains empty. What am I doing wrong?

Hard to say without seeing more code.

Have you tried stepping through your code with a debugger? How about adding NSLog() statements to be positive you're doing what you think you're doing? You're sure _notes is what you think it is? You're using [_notes addObject:someObject]? How are you ascertaining that the array is empty?

When describing a bug, it helps to explain:

* what you did
* what you expected to happen
* what actually happened
* how you checked your assumptions about what happened

--Andy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSMutableArray-can't add objects of my class
      • From: ".::welemski::." <email@hidden>
References: 
 >NSMutableArray-can't add objects of my class (From: Rex Fernando <email@hidden>)

  • Prev by Date: Re: NSMutableArray-can't add objects of my class
  • Next by Date: Strange behaviour with Application menu.
  • Previous by thread: Re: NSMutableArray-can't add objects of my class
  • Next by thread: Re: NSMutableArray-can't add objects of my class
  • Index(es):
    • Date
    • Thread