Funtik

Results 125 comments of Funtik

most likely yes, new versions of the kotlin compiler didn’t seem to work with the old IDEA

this refers to Kotlin, which version of Java you want to compile into, Kotlin supports target 1.6 (by default) so it is indicated that 1.8 should be specified. Until recently,...

I have code like this, instead of parameters in the constructor, you can use this: ``` class LineChart24Hours : Fragment() { val titleChart: String by param("") // default value val...

if you need exactly koin support: https://edvin.gitbooks.io/tornadofx-guide/content/part2/Dependency_Injection.html

> Firstly, this is validation, when the compiler checks (in the case of koin) everything that is needed before starting the application. my version is also checked in compile time....

Your option gives priority to non-native DI. It also becomes unclear where we got the instance from (from which DI). This leads to confusion and makes it harder to understand...

for other DIs you need to use: ``` val MyView : View() { val helloService: HelloService by di() } ``` What are the reasons for TornadofX DI behavior change?

Yes, but this requires some serious work on the concept rather than changing a few lines (maybe it should be done in Tornadofx 2.0). Where is your constructor with parameters...

Well, there is one option for automatic inject through the constructor (through the same reflection). And it shouldn't break old code. The logic is simple, we check the parameters of...

https://github.com/SchweinchenFuntik/tornadofx/blob/DI_constructor_injection/src/main/java/tornadofx/FX.kt#L437 a big drawback of the approach - parameters with types that cannot be injected can be passed to the constructor simple sample: ``` class TView(private val tController: TController, val...