mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-13 23:23:29 +01:00
CoreStoreObject snapshot doesn't work with ObjectPublisher #308
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joeljfischer on GitHub (Feb 3, 2020).
Referencing a property on an
ObjectSnapshot<MyObject>whereMyObjectinherits fromCoreStoreObjectresults in an error:Do I have to change my object to be an
NSManagedObjectto get this to work?@JohnEstropia commented on GitHub (Feb 4, 2020):
It simply means the signature doesn't match. Can you show the code you are getting this error in?
@joeljfischer commented on GitHub (Feb 4, 2020):
Sure, I'll try to provide the relevant code:
@JohnEstropia commented on GitHub (Feb 4, 2020):
What is
isPaused? Is it a computed property? If so you will need to write that property in an extension:@joeljfischer commented on GitHub (Feb 4, 2020):
That's a good catch. It is a computed property, I didn't think about that. So I will need to write the computed property twice, once on an
ObjectSnapshotextensions and once on the actual object itself (if I need to access it in both of those contexts)?@JohnEstropia commented on GitHub (Feb 8, 2020):
Unfortunately that's a language limitation for now.
There will be a new way to do this using
@Field.Virtualin an upcoming version (Swift 5.2): https://github.com/JohnEstropia/CoreStore/issues/359It will be released soon after Xcode 11.4 goes out of beta.
@joeljfischer commented on GitHub (Feb 10, 2020):
Thanks for the help, this issue can be closed if you wish.