CBLUITableSource?

13 views
Skip to first unread message

Todd Freese

unread,
Nov 3, 2016, 12:35:30 PM11/3/16
to Couchbase Mobile
Is there a CBLNSTableSource equivalant to CBLUITableSource for use in a Mac App that is using CBL?

Todd

Jens Alfke

unread,
Nov 3, 2016, 12:47:40 PM11/3/16
to mobile-c...@googlegroups.com

On Nov 3, 2016, at 9:35 AM, Todd Freese <to...@filmworkers.com> wrote:

Is there a CBLNSTableSource equivalant to CBLUITableSource for use in a Mac App that is using CBL?

No; In Mac apps I’ve just used bindings to drive tables. (CBLUITableSource was written partly as a workaround for the lack of Cocoa bindings in iOS.)

You do have to write a tiny little class to expose a live-query as an array property of an object, which you can then bind as the source of an NSArrayController. It’s actually included in the CBL source tree as part of some ancient Mac test/demo code: DemoQuery.hDemoQuery.m.

—Jens

Todd Freese

unread,
Nov 3, 2016, 7:27:57 PM11/3/16
to Couchbase Mobile
Thanks Jens, that worked perfectly!

T
Reply all
Reply to author
Forward
0 new messages