you don't have to put it in a function like that. ...
# tornadofx
a
you don't have to put it in a function like that.
(classname).replaceWith(className)
should be enough