removeObjectsInArray enhancement?
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.