2
__version__ = "$Revision: 1.1 $"
3
__date__ = "$Date: 2004/05/25 19:47:08 $"
7
from PythonCard import model
11
class Runtime( threading.Thread ) :
13
def __init__( self, path, clazz ) :
14
threading.Thread.__init__( self )
21
self._app = model.Application( self._clazz )
25
def getApplication( self ) :
26
while not self._running :
30
class User( object ) :
32
def __init__( self, window ) :
34
Create a test proxy to a PythonCard window.
38
def click( self, path ) :
40
Generate a mouse down event for the button
42
Path example: myPanel.myButton
44
button = self._window.getComponent( path )
45
event = wx.CommandEvent( wx.wxEVT_COMMAND_BUTTON_CLICKED, button.GetId() )
46
wx.PostEvent( button, event )
48
def type( self, path, text ) :
50
Type the 'text', character by character, into
51
the TextField or TextArea identified by 'path'
52
Path example: myPanel.myField
54
field = self._window.getComponent( path )
55
field.SetValue( text )
56
#event = wx.CommandEvent( wx.wxEVT_COMMAND_TEXT_ENTER, field.GetId() )
57
#wx.PostEvent( field, event )
59
def select( self, path, value ) :
61
Set the selected value of the component
62
identified by path to 'value'. This method
63
can be used for popop menus, and single selection lists.
64
Path example: myPanel.myMenu