Graphical Toolkits for OS X: wxPython
Subject:   Nice article but misleading code structure
Date:   2007-05-07 07:51:53
From:   strogon14
Nice article with a good overview!

Looking at the longer log file analyzing example, I find it a bit problematic from a didactic point of view that the button says "Click to search log file" although the log file has been already parsed by the time the dialog is shown.

An important aspect of GUI programming are callbacks and event-driven programming. So actions in your program should only be carried out, when the user has requested them (e.g. by clicking a button). Or the button should be labeled "Show log file statistics".

In a nutshell, put the log file parsing in a function and a call to it in the "onClick" method.

1 to 1 of 1
  1. Jeremiah Foster photo Nice article but misleading code structure
    2007-05-07 07:56:03  Jeremiah Foster | O'Reilly Blogger [View]

1 to 1 of 1