edvin
10/12/2016, 7:31 PMjchildress
10/12/2016, 7:34 PMedvin
10/12/2016, 7:37 PMjchildress
10/12/2016, 7:42 PMgtnarg
10/12/2016, 8:13 PMedvin
10/12/2016, 9:21 PMonChange
shortcut instead of the addlistener thing, so you can write that last line textArea.textProperty().onChange { textProperty.setValueFromEditor(it) }
.carlw
10/12/2016, 9:22 PMedvin
10/12/2016, 9:24 PMedvin
10/12/2016, 9:30 PMcontentLabel.toggleClass
line should be outside the itemProperty.onChange
- it doesn't need to be reapplied when the item changes. I think the TornadoFX ViewModel is not very well suited for mediating between Views in it's current implementation actually. Right now a better word for it would probably be EditModel
, since it doesn't observe changes to the properties it wraps, and that it needs a commit to happen for changes to be pushed back to the underlying object. This use case would be easier solved with a more direct view model. I will create an example and show you what I mean tomorrow. Wow, this little app has made me realize a lot of shortcomings for the ViewModel. It might just need an immediate
mode though. Will be looking at that tomorrow as well.carlw
10/12/2016, 9:34 PMedvin
10/12/2016, 9:40 PMcarlw
10/12/2016, 9:41 PMcarlw
10/12/2016, 9:41 PMcarlw
10/12/2016, 9:42 PMedvin
10/12/2016, 9:42 PMcarlw
10/12/2016, 9:44 PMcarlw
10/12/2016, 9:44 PMcarlw
10/12/2016, 9:45 PMcarlw
10/12/2016, 9:55 PMvoddan
10/13/2016, 8:02 AMpublic class Main extends App {
public Main() {
super(JvmClassMappingKt.getKotlinClass(MainView.class) );
}
public static void main(String [] args)
{
}
}
What do I do?edvin
10/13/2016, 8:05 AMedvin
10/13/2016, 8:06 AMvoddan
10/13/2016, 8:08 AMvoddan
10/13/2016, 8:09 AMedvin
10/13/2016, 8:09 AMedvin
10/13/2016, 8:10 AM