Giter Site home page Giter Site logo

Comments (2)

rksm avatar rksm commented on June 12, 2024

reloadModule can keep the identity of objects when you tell it to keep its environment via passing options. However we specifically do not need to reload modules when we save them. Particularly for the purpose of commiting a module change we have the moduleSourceChange method that should be used from within a tool via system. interactivelyChangeModule. This method uses a mechanism that ensures the identity of classes and exports and will properly update the instances of your classes.

from lively.modules.

levjj avatar levjj commented on June 12, 2024

Okay, this would probably solve the issue. However, the method interactivelyChangeModule can only be used by the vmEditor (or tools with a method updateModuleList) due to this line:

await vmEditor.updateModuleList();

Instead, I would suggest to use notifications, so tools can subscribe to "moduleChange" and similar events. With the current implementation , other tools or multiple instances of the vmEditor are not supported (with multiple vmEditors only one will update, leading to an inconsistent state).

from lively.modules.

Related Issues (20)

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.