-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI initialization with Inheritance #52
Comments
I have found that initializing the root lazy (
It seems that here it is assumed, that A workaround I found for now is to avoid the builder implementation in FX.kt, by doing something like this:
works, but its not exactly what I would call a nice solution ;) |
You're right, the framework expects the root to be created at once, and there are probably more cases of that than the one you ran into. You might have better success by overriding |
Thanks for the advice. There are special types of Letters (like an invoice) whose models contain additional information. Would you recommend a different approach? composition? |
Consider the followingFragment class and its child class:
I want Classes inheriting from
A
to be able to add their own stuff in some subpart of theA.root
.This setup leads to an NPE (
labelText
is null) due to the order in which initialization happens with Kotlin (as explained here).How can this be achieved properly?
The text was updated successfully, but these errors were encountered: