How to create an empty Results<T> object?

Viewed 3913

I'm trying to create a MutableProperty which holds a Results received from Realm.objects(_:). To create the property I need to give it an initial value; hence an 'empty' Results.

I've tried creating one using:

var someThings = Results<SomeObject>()
MutableProperty(someThings)

But the compiler gives me the error: Cannot invoke initializer for type 'Results<SomeObject>' with no arguments.

While I understand the error, I'm not really sure how to create a Results object in this context. Looking at the source of Results I couldn't find an init either.


So my question is; how can I create a Results myself to use in a MutableProperty?

Edit:

I've seen this question...but that doesn't really help (unless I'm going to create a "wrapper" for the MutableProperty or something).

1 Answers
Related