The smart button

Written by

in

, ,

I don’t always understand why people do things in some ways.

Comments

4 responses to “The smart button”

  1. Purple-Bobby Avatar
    Purple-Bobby

    Rookie mistakes

  2. dragnucs Avatar
    dragnucs

    What ways?

    1. Kjetil Kilhavn Avatar
      Kjetil Kilhavn

      The way shown in the code above, where one event handler seems to handle three (or two) buttons and even uses hardcoded text strings to identify the function to execute.
      Breaks if someone translates the UI, breaks if someone changes Quit to Close or Exit, and is not good separation of responsibility as it combines (in the same code block) starting/stopping something within the running application with application termination

  3. pablo Avatar
    pablo

    Because they really don’t know better.