Hi all!
Just a question:
Is BehaviorDelegate - onNextPage() with datafields not available?
I want to trap the Next- and Previous Page button of an Edge 530 (Edge without touchscreen).
Doesn't work...
onTap(clickEvent) works flawlessly on touchscreens.
Sorry in advance if it's - again - a horrible coding... ;-(
// TestDatafield for mechanical Gearshift: find right wheel circumference //------------------------------------------------------------------- class InputDelegate extends WatchUi.BehaviorDelegate { var view; var tX; var tY; function initialize(v) { BehaviorDelegate.initialize(); view = v; } function onNextPage() { view.tapMinus = true; view.tapFlag = true; return true; } function onPreviousPage() { view.tapPlus = true; view.tapFlag = true; return true; } function onTap(clickEvent) { var tapCoordinates = clickEvent.getCoordinates(); tX = tapCoordinates[0]; tY = tapCoordinates[1]; //System.println( tX + " " + tY ); if ( tX < 60 and tY > 30 ) { // tap on MINUS view.tapMinus = true; view.tapFlag = true; return true; } else if ( tX > 220 and tY > 30 ) { // tap on PLUS view.tapPlus = true; view.tapFlag = true; return true; } else if ( tX > 90 and tX < 190 and tY < 30 ) { // tap on Bike # view.tapDevice = true; view.tapFlag = true; return true; } else { return false; } } }