Skip to content


Out-of-box document-level do not delete support for table rows #63

pulkitsinghal opened this Issue · 1 comment

2 participants


I often run into use cases where I need to pre-populate a fake document in order to simulate a row of data in my table view (built using CouchUITableSource):
a) either, because I want to show the user what sort of interaction they can have with the given view,
b) or, because the table row is actually an action siting with the rest of the data rows, which seems to be a popular way to work these days (Any.Do app)

I have written a very simple patch which allows developers to provide CouchUITableSource with a property doNotDeleteProperty and gain document-level control over which rows may or may not be deleted.

If my document model has the property -[CouchModel setMustStickAround:] then:
a) setting that to true on only the objects that should NOT be deleted, and
b) letting CouchCocoa know about which property to monitor -[CouchUITableSource setDoNotDeleteProperty:@"mustStickAround"] ... will do the job.

couchbaselabs member

This sounds good, but I'm at the point now where I'm trying to keep the size of the core code down (it's getting near 500k on iOS.) Maybe you could refactor this into a subclass, and we could publish this somewhere as an optional extension people could add to their app projects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.