Hello everyone, I have a controller which stores t...
# tornadofx
a
Hello everyone, I have a controller which stores the data of some workers types. At some point i need this controller to calculate the hourlyRate and I would like to inject this controller. This seems not to be possible because my class is not a tfx component so i used
val workers = find(WorkerDatabase::class)
which works fine if i use it in a function, but not if i declare it as a field in the class (Getting NPE if i use
workers
). Maybe somebody could tell me whether i'm doing something wrong ...
You need to look at your control as it is declared