Had to reboot the macbook. No key or key combo worked. Esc, Cmd-Tab, Cmd-Ctr-F.
The code that's the culprit is rather simple (see below).
It worked fine until I switched to full screen and then back, turned on the axes (not sure that's relevant, but just to capture the sequence of events. I will write again after root-causing this), turned the axes off again and the keys (defined below) stopped working. I then switch it to full screen using the context menu (stupid thing to do, but, that's hindsight for you :-) and got stuck. Now that I captured this so far, let me try to reproduce it. Wish me luck.
onKeyPress {
case 90 => { // pressed z
removeLastPoint()
println(points.size + " points now")
}
case 67 => { // pressed c
if (emptyStack()) { println("stack empty now") }
else {
val oldPoint = popFromStack()
points.append(oldPoint)
println(s"${points.size}")
if (points.size > 2) {
drawTriangles()
}
}
}
case 88 => { // pressed x
while (!emptyStack) removedPoints.pop
println("empty")
}
case a => println(s"$a")
}
Had to reboot the macbook. No key or key combo worked. Esc, Cmd-Tab, Cmd-Ctr-F.
The code that's the culprit is rather simple (see below).
It worked fine until I switched to full screen and then back, turned on the axes (not sure that's relevant, but just to capture the sequence of events. I will write again after root-causing this), turned the axes off again and the keys (defined below) stopped working. I then switch it to full screen using the context menu (stupid thing to do, but, that's hindsight for you :-) and got stuck. Now that I captured this so far, let me try to reproduce it. Wish me luck.