Git Product home page Git Product logo

Comments (3)

ogoffart avatar ogoffart commented on August 25, 2024

Maybe what we want is not property aliases, but two ways binding.

For example , it could look like:

   LineEdit {
      text <=> settings.first_name;
   }

from slint.

tronical avatar tronical commented on August 25, 2024

You're right, two-way bindings address the specific issue I'm facing as well as a few others. Just thinking out loud:

  1. If two properties are supposed to be bound together, perhaps the property handle of one property could point to the bound property. Any get() will fetch from the other property, any set() and set_binding() will forward. Not sure yet though how to indicate that, since we use both free bits (lock and binding bit). Perhaps one more binding allocation.

  2. If the compiler sees a two-way binding between two properties where at least one is declared in .60 itself, then it could eliminate one in favour of the other and adjust PropertyReferences. There are probably a few combinations how the compiler could treat this in terms of optimisations.

from slint.

ogoffart avatar ogoffart commented on August 25, 2024

both could work i think. We would need to have the property handle refcounted, but that's doable.

from slint.

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.