• 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
NSMutableArray:arrayWithObjects question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMutableArray:arrayWithObjects question


  • Subject: NSMutableArray:arrayWithObjects question
  • From: Jay Wooten <email@hidden>
  • Date: Fri, 17 Nov 2006 14:00:42 -0500

Hello - this is my first post, and a total newb question:


I have a single window app with a one column NSTableView on it. I have an AppController object which is the datasource for the NSTableview.


In the AppController, I have defined an NSMutableArray to hold the data for the table:

myArray = [NSMutableArray arrayWithObjects:@"One", @"Two", @"Three", nil];

Run the app. The table displays three rows of data and then the app crashes.

So I changed how I pre-load the array to this

[myArray addObject:@"One"];
[myArray addObject:@"Two"];
[myArray addObject:@"Three"];

and the app works fine.

Is there something about arrayWithObjects that make the array not valid as a data source? Anyone have any ideas?

Jay Wooten, President
Go Data Systems, Inc.
www.godatasystems.com
email@hidden




_______________________________________________ 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:arrayWithObjects question
      • From: Mike Abdullah <email@hidden>
    • Re: NSMutableArray:arrayWithObjects question
      • From: Hank Heijink <email@hidden>
    • Re: NSMutableArray:arrayWithObjects question
      • From: "Stephen Deken" <email@hidden>
  • Prev by Date: Re: Non-square (triangular) views
  • Next by Date: Re: Non-square (triangular) views
  • Previous by thread: Re: CoreData undo and observing related objects
  • Next by thread: Re: NSMutableArray:arrayWithObjects question
  • Index(es):
    • Date
    • Thread