• 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
removeObjectsInArray enhancement?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

removeObjectsInArray enhancement?


  • Subject: removeObjectsInArray enhancement?
  • From: Andrew Merenbach <email@hidden>
  • Date: Mon, 27 Jan 2003 15:02:55 -0800

I'm using a table view in which rows can be added and deleted, and a new method occurred to me. My old code for deleting rows removed entries with NSTableView's selectedRowEnumerator method, adding entries to remove to an array and removing them with removeObjectsInArray:. This had the unwanted side effect, however, of removing all objects equal to the entries to remove--if for some reason I had two identical entries, both would be deleted.

I've worked around this by further enumerating through the entries-to-remove array and using removeObjectIdenticalTo: on each distinct element, but might there be use for a removeIdenticalObjectsInArray: method (or something similar) that would remove an array of objects from another array only if their addresses matched?

Take care,
Andrew
_______________________________________________
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.

  • Prev by Date: Re: copyPath and performFileOperation
  • Next by Date: Re: How many copies?
  • Previous by thread: Re: How many copies?
  • Next by thread: Loading fonts from bundles (again!)
  • Index(es):
    • Date
    • Thread