Originally created by @JohnEstropia on GitHub (Nov 20, 2015).
CoreStore's features right now are mostly ones that I needed on Swift projects I have been involved
with so far, but I am curious as to what features other apps may be looking for.
I've thought of a few, you can vote for them here: http://goo.gl/RIiHMP
I'd appreciate any suggestions in this thread as well :)
Originally created by @JohnEstropia on GitHub (Nov 20, 2015).
CoreStore's features right now are mostly ones that I needed on Swift projects I have been involved
with so far, but I am curious as to what features other apps may be looking for.
I've thought of a few, you can vote for them here: http://goo.gl/RIiHMP
I'd appreciate any suggestions in this thread as well :)
I tried to implement an extension for RxSwift to wrap ListMonitor delegate, but can't because ListObserver protocol has a generic constraint. Any ideas how to get around this? It would be possible if ListMonitor had a delegate property of AnyObject type.
@vburojevic commented on GitHub (Nov 22, 2015):
Hi! Nice work so far on CoreStore!
I tried to implement an extension for RxSwift to wrap ListMonitor delegate, but can't because ListObserver protocol has a generic constraint. Any ideas how to get around this? It would be possible if ListMonitor had a delegate property of AnyObject type.
Please refer to example here:
https://github.com/ReactiveX/RxSwift/#delegates
@vburojevic From my understanding, RX's support for "delegates" is designed for cocoa's id delegate paradigm (i.e. typeless), which is really against ListMonitor's purpose. I think by creating a custom ListObserver classthat
stores an ObserverOf<(ListEntityType, NSIndexPath)> property
implements all ListObserver methods and calls
self.observer.on(.Next(.Update/* or .Move etc.*/(object,indexPath)))
in each method with the corresponding RxEvent,
You can probably write an extension on ListMonitor:
I haven't thought about it too much yet, but if RX is to be supported internally by CoreStore I'm thinking implementing PublishSubject on ListMonitor makes the most sense. I might be wrong though (I just started using RXSwift this week).
If you'd like to continue this discussion, you can create a separate issue for it :)
@JohnEstropia commented on GitHub (Nov 22, 2015):
@vburojevic From my understanding, RX's support for "delegates" is designed for cocoa's `id delegate` paradigm (i.e. typeless), which is really against `ListMonitor`'s purpose. I think by creating a custom `ListObserver` classthat
1. stores an `ObserverOf<(ListEntityType, NSIndexPath)>` property
2. implements all `ListObserver` methods and calls
``` swift
self.observer.on(.Next(.Update /* or .Move etc.*/(object, indexPath)))
```
in each method with the corresponding `RxEvent`,
You can probably write an extension on `ListMonitor`:
``` swift
extension ListMonitor {
// ...
func rx_inserted(...) -> Observable<(ListEntityType, NSIndexPath)>
func rx_updated(...) -> Observable<(ListEntityType, NSIndexPath)>
func rx_deleted(...) -> Observable<(ListEntityType, NSIndexPath)>
```
I haven't thought about it too much yet, but if RX is to be supported _internally_ by CoreStore I'm thinking implementing `PublishSubject` on `ListMonitor` makes the most sense. I might be wrong though (I just started using RXSwift this week).
If you'd like to continue this discussion, you can create a separate issue for it :)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @JohnEstropia on GitHub (Nov 20, 2015).
CoreStore's features right now are mostly ones that I needed on Swift projects I have been involved
with so far, but I am curious as to what features other apps may be looking for.
I've thought of a few, you can vote for them here: http://goo.gl/RIiHMP
I'd appreciate any suggestions in this thread as well :)
@vburojevic commented on GitHub (Nov 22, 2015):
Hi! Nice work so far on CoreStore!
I tried to implement an extension for RxSwift to wrap ListMonitor delegate, but can't because ListObserver protocol has a generic constraint. Any ideas how to get around this? It would be possible if ListMonitor had a delegate property of AnyObject type.
Please refer to example here:
https://github.com/ReactiveX/RxSwift/#delegates
@JohnEstropia commented on GitHub (Nov 22, 2015):
@vburojevic From my understanding, RX's support for "delegates" is designed for cocoa's
id delegateparadigm (i.e. typeless), which is really againstListMonitor's purpose. I think by creating a customListObserverclassthatObserverOf<(ListEntityType, NSIndexPath)>propertyListObservermethods and callsin each method with the corresponding
RxEvent,You can probably write an extension on
ListMonitor:I haven't thought about it too much yet, but if RX is to be supported internally by CoreStore I'm thinking implementing
PublishSubjectonListMonitormakes the most sense. I might be wrong though (I just started using RXSwift this week).If you'd like to continue this discussion, you can create a separate issue for it :)