Class: Toybox.WatchUi.ConfirmationDelegate

Overview

ConfirmationDelegate responds to a Confirmation selection.

See Also:

Example:

using Toybox.WatchUi;
using Toybox.System;

class MyConfirmationDelegate extends WatchUi.ConfirmationDelegate {
    function initialize() {
        ConfirmationDelegate.initialize();
    }

    function onResponse(response) {
        if (response == WatchUi.CONFIRM_NO) {
            System.println("Cancel");
        } else {
            System.println("Confirm");
        }
    }
}

Since:

API Level 1.0.0

Instance Method Summary collapse

Instance Method Details

onResponse(response as WatchUi.Confirm) as Lang.Boolean

A confirmation selection was made.

This method is called when a Confirmation response is selected, and receives the response as an argument. The response is either a CONFIRM_NO or CONFIRM_YES value.

Parameters:

  • response(Lang.Number)

    The WatchUi.CONFIRM_* value from this Confirmation

See Also:

Since:

API Level 1.0.0


Generated Jan 5, 2024 1:53:16 PM