Trying to make a widget

Hello,

For my intership, my client has asked to make a Garmin widget to connect to their hardware and smartphone.

I never worked with MonkeyC before and I don't understand how it works and the only tutorials I've found are about making a hello world or changing the font of the watchface.

I tried to make an onTap doing this

function onTap(clickEvent){
System.println("onTap")
System.exit();
}

I tried also with onPress,onLongPress and onSwipe but it doesn't seem to work

I also put them on class InputDelegate extends Ui.InputDelegate but I have the same result.

Do I have to call the function somewhere?