What happens here is that the first time you activ...
# tornadofx
e
What happens here is that the first time you activate the menuitem, it gets it's action property set (because the code inside the menuitem block runs). The next time you activate the menuitem, it again sets the onAction event, but since it was already set, it also triggers.