Code Monkey home page Code Monkey logo

Comments (2)

shufflingB avatar shufflingB commented on May 29, 2024

Hi Clifton,

Will take me a days or so context switch fully back to the joys of CoreData/Publishers/Combine etc but need something similar myself so wiil have a look/ponder this week.

fwiw I'm hoping it'll be fairly simple, but know that usually means I'm missing something - so if you've cracked it in the meantime do let me know as I'd be interested in what you've come up with :-)

Kind regards

Jon

from swiftui-core-data-with-model.

cliftonlabrum avatar cliftonlabrum commented on May 29, 2024

Thanks for your reply. I did find a solution, yes. You can see the answers given here: https://stackoverflow.com/questions/66253532/reinitialize-combine-publishers-when-user-changes-global-object/66253686

As long as you have an @ObservableObject that manages your project change (or a workspace as shown in the SO question), then you can simply listen for it and setup your Combine publishers again and have them pass in the new value that your NSPredicate uses. 🙂

from swiftui-core-data-with-model.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.