Git Product home page Git Product logo

Comments (4)

AdamBien avatar AdamBien commented on August 30, 2024

Good idea, but: who calls the setModelOrService(String,Object) method? So far this method was used for test purposes only. You would have to call the method setModelOrService before the InjectionProvider started with wiring.

from afterburner.fx.

aliebelt avatar aliebelt commented on August 30, 2024

Beside using command line arguments for system properties we use System.setProperty at runtime. Because we wanted to inject numbers and maybe other objects we though about the inject mechanisms and opened this issue.
Our idea was to replace the System.setProperty(String, String) with a more powerful setModelOrService(String,Object).

from afterburner.fx.

AdamBien avatar AdamBien commented on August 30, 2024

We will need a third class, like ConfigurationProvider / ConfigurationSource which provides such attributes. Such a class will have to be loaded, before FXML kicks in...

from afterburner.fx.

AdamBien avatar AdamBien commented on August 30, 2024

ConfigurationSource is implemented as: Function<Object, Object> configurationSupplier Please checkout InjectorTest::longInjectionWithCustomProvider and Injector::setConfigurationSource

Also with Injector::setInstanceSupplier you should be able to provide your own products (= models, services etc.)

Warning: I renamed InjectionProvider to Injector (shorter).

from afterburner.fx.

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.