sialcasa / mvvmFX

an Application Framework for implementing the MVVM Pattern with JavaFX
Apache License 2.0
489 stars 104 forks source link

Scopes not injected before view is initialized when the view model instance is provided #559

Closed bendardenne closed 5 years ago

bendardenne commented 5 years ago

Hi,

We've been using scopes quite extensively and we recently noticed that if you provide the instance of the view model to the fluent loader, the scopes are injected only after the view is initialized().

I think it would make more sense to make sure that the scopes are injected before initializing the view, and it would also be more consistent with what happens if you let the loader instantiate the view model class.

We are using version 1.7.0.

manuel-mauky commented 5 years ago

Hi, thank you for your hint. The loading process in the ViewLoader is quite complicated with many special cases so maybe we missed this behaviour. I will have a look at it.