Hi all,
I surely miss something but don't find what...
I try to understand what function of a behaviorDelegate is called when I push the upper button of a vivoactive4. So I overload all functions of inputDelegate and behaviorDelegate and put a println.
But when I start the simulator and push the button : nothing in the log !!... Same for holding pressure on screen.
class APICallDelegate extends WatchUi.BehaviorDelegate {
function initialize() {
BehaviorDelegate.initialize();
}
function onKey(evt) {
var key = evt.getKey();
System.println("Evt = " + evt + ", key=" + key); // e.g. CLICK_TYPE_TAP = 0
return true;
}
function onTap(clickEvent) {
System.println("arg1");
if (Application.Properties.getValue("TapLaunch") || selected_action == null) {
self.onKey(new Toybox.WatchUi.KeyEvent(KEY_ENTER, PRESS_TYPE_ACTION));
}
return true;
}
function onNextMode() {
System.println("arg3");
return false;
}
function onNextPage() {
System.println("arg4");
return false;
}
function onPreviousMode() {
System.println("arg5");
return false;
}
function onPreviousPage() {
System.println("arg6");
return false;
}
function onSelect() {
System.println("arg7");
return false;
}
function onKeyPressed(keyEvent) {
System.println("arg8");
return false;
}
function onKeyReleased(keyEvent) {
System.println("arg9");
return false;
}
function onRelease(clickEvent) {
System.println("arg10");
return false;
}
function onSelectable(selectableEvent) {
System.println("arg11");
return false;
}
function onSwipe(swipeEvent) {
System.println("arg12");
return false;
}
function onHold(clickEvent) {
System.println("arg20");
self.onMenu();
return true;
}
function onMenu() {
System.println("arg21");
...
return true;
}
function onBack() {
System.println("arg22");
System.exit();
}
