Problem obtaining an object reference...

SamG mad.vijay at gmail.com
Thu Aug 7 02:52:55 EDT 2008


I have two windowing classes A and B.

Inside A's constructor i created an instance B to display its Modal
window. Only on clicking OK/ Closing this modal window do i proceed to
display the A's window.

All that is fine. Now the problem is i would like to write a python
script to test the this GUI app simulating all the events that make
A's window work through my script. No the problem is to get past my
B's window. Which i'm unable to do since the A's instance would any be
created completely if i click OK/Close button on the B's window. Im
unable to simulate that event since i have little idea about how to
get the object reference to B's window? Here is a sample of the code.


class Awindow:

	def __init__(self):
		<doing something>
		<doing something>
		self.showBwindow()
	def showBwindow(self):
		dialog = Bwindow()
		dialog.ShowModal()
		dialog.Destroy()

class Bwindow:
	def __init__(self):
		<define propertis of Bwindow>


Pls help.



More information about the Python-list mailing list