~ubuntu-branches/ubuntu/maverick/python-avc/maverick

« back to all changes in this revision

Viewing changes to examples/wx_showcase.py

  • Committer: Bazaar Package Importer
  • Author(s): Fabrizio Pollastri
  • Date: 2009-04-20 12:28:35 UTC
  • mfrom: (1.1.4 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090420122835-xf2fz6xyszsvixjc
Tags: 0.7.1-1
* New upstream
* Standards-Version bumped to 3.8.1 (no changes needed)
* Removed license.odt file from doc/

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    self.index = 0
60
60
    self.integer = 0
61
61
    self.float = 0.0
 
62
    self.progressbar = -1.0
62
63
    self.string = ''
63
64
    self.textview = ''
64
65
    self.status = ''
77
78
  def incrementer(self,*args):
78
79
    """
79
80
    Booleans are toggled, radio button index is rotated from first to last,
80
 
    integer is incremented by 1, float by 0.5, string is appended a char
 
81
    integer is incremented by 1, float by 0.5, progress bar is alternatively
 
82
    shuttled or incremented from 0 to 100%, string is appended a char
81
83
    until maxlen when string is cleared, text view/edit is appended a line
82
84
    of text until maxlen when it is cleared. Status bar message is toggled.
83
85
    Return True to keep timer alive.
102
104
      self.float += 0.5
103
105
      yield True
104
106
 
 
107
      if self.progressbar >= 0.9999:
 
108
        self.progressbar = -1.0
 
109
      else:
 
110
        self.progressbar += 0.1
 
111
      yield True
 
112
 
105
113
      if len(self.string) >= 10:
106
114
        self.string = ''
107
115
      else: