Uploaded image for project: 'Click'
  1. Click
  2. CLK-369

Investigate adding ActionListener objet to Controls

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5 M2
    • 1.5 M2
    • core
    • None

    Description

      Currently the listener registered on Controls is string based.

      While simple to create it is harder to maintain as refactoring cannot be applied when renaming the method.

      An alternative to the string based listener is to introduce a ActionListener object that encapsulates the callback, and a method, AbstractControl.setListener(ActionListener) which registers the listener on the control.

      public class ActionListener {
      public boolean onAction(Control control)

      { return true; }

      }

      Attachments

        Activity

          People

            sabob Bob Schellink
            sabob Bob Schellink
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment