• 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: Deleting from TableView and MutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deleting from TableView and MutableArray


  • Subject: Re: Deleting from TableView and MutableArray
  • From: Pandaa <email@hidden>
  • Date: Wed, 14 Apr 2004 19:02:34 +0200

2004-04-14 kl. 01.15 skrev Carl Sziebert:

Hi all:

I am rather new to objective-c and am having trouble figuring out the correct way to do the following:

My application has a table view that displays items which are a subset of a master mutable array. The issue that I am attempting to solve is when I choose an item in the table view and want to delete it. It should be removed from both the table view and the master array.

Any advice is greatly appreciated.

Since deleting objects in arrays is O(n), it will do fine to simply search the master array linearly for the object to be deleted. Try using indexOfObject:, or removeObject: directly.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . earth water fire air software - the five elements . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. email@hidden . . www.synapticpulse.net .
_______________________________________________
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.


References: 
 >Deleting from TableView and MutableArray (From: Carl Sziebert <email@hidden>)

  • Prev by Date: Re: Inline tableview editing problem (table doesn't end editing)
  • Next by Date: Mouse Movement tracking
  • Previous by thread: Re: Deleting from TableView and MutableArray
  • Next by thread: Font Smoothing In A Bitmap
  • Index(es):
    • Date
    • Thread