~toolpart/+junk/pythoncard

« back to all changes in this revision

Viewing changes to samples/proof/proof.py

  • Committer: Bazaar Package Importer
  • Author(s): Mohammed Adnène Trojette
  • Date: 2006-11-12 17:52:13 UTC
  • mfrom: (2.1.5 feisty)
  • Revision ID: james.westby@ubuntu.com-20061112175213-tv8bnl6rtpa2qw1o
Tags: 0.8.1-8.1
* Non-maintainer upload.
* Fix path to findfiles, codeEditor and resourceEditor:
   + patch from Ernest ter Kuile <ernestjw@xs4all.nl>. (Closes: #397018)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
3
3
"""
4
 
__version__ = "$Revision: 1.11 $"
5
 
__date__ = "$Date: 2003/01/13 17:50:39 $"
 
4
__version__ = "$Revision: 1.16 $"
 
5
__date__ = "$Date: 2004/05/05 03:51:54 $"
6
6
"""
7
7
 
8
8
import time
9
 
from PythonCardPrototype import log, model
 
9
from PythonCard import log, model
10
10
 
11
11
class Proof(model.Background) :
12
12
 
23
23
        field1.text = "it's %s" % time.asctime( now )
24
24
        listX = self.components.list
25
25
        log.debug( listX.items )
26
 
        log.debug( listX.selection )
27
 
        listX.selection = "one"
 
26
        log.debug( listX.stringSelection )
 
27
        listX.stringSelection = "one"
28
28
 
29
29
        slider = self.components.aSlider
30
30
        log.debug( 'min='+ str( slider.min ) )
49
49
    def on_imagebtn_mouseClick( self, event ) :
50
50
        log.debug( 'imagebutton-mouseClick:' + str( event.target ) )
51
51
 
52
 
        # RDS - MessageEvent has been removed - replacement functionality
53
 
        #       has not been decided yet.
54
 
 
55
 
        #msgEvent = MessageEvent( 'button1', 'doClick', None, self )
56
 
        ##self.postEvent( msgEvent )
57
 
 
58
52
    def on_list_select ( self, event ) :
59
 
        print 'list-select event, selected: ' + str( event.target.selection )
 
53
        print 'list-select event, selected: ' + str( event.target.stringSelection )
60
54
        print self
61
55
        
62
56
    def on_list_mouseDoubleClick( self, event ) :
63
 
        print 'list-mouseDoubleClick, selected: ' + str( event.target.selection )
 
57
        print 'list-mouseDoubleClick, selected: ' + str( event.target.stringSelection )
64
58
 
65
59
    def on_field1_textUpdate ( self, event ) :
66
60
        log.debug( 'text-update:' + event.target.text )
81
75
        log.debug( '\nchoice-selected: ' + str( event.target ) )
82
76
 
83
77
    def on_mnuExit_select(self, event):
84
 
        self.Close()
 
78
        self.close()
85
79
 
86
80
 
87
81
if __name__ == '__main__':
88
 
    app = model.PythonCardApp(Proof)
 
82
    app = model.Application(Proof)
89
83
    app.MainLoop()