Re: [Tutor] how do i access object

2007-01-04 Thread Ketan Maheshwari
Hi As suggested by Alan, I wrote a method getcenter as follows *** def getcenter(self): xy=self.canvas.coords(self.id) xcenter=(xy[2]-xy[0])/2 ycenter=(xy[3]-xy[1])/2 return xcenter, ycenter *** However, when I call this method from the instance of Circle class I get

Re: [Tutor] how do i access object

2007-01-03 Thread Kent Johnson
Ketan Maheshwari wrote: > Hi All > I have this code from the web that I modified according to y > requirements. It has a class called Circle. Then there are a few objects > of this class created using a constructor. The constructor essentially > creates the circles and the update mathod makes th

Re: [Tutor] how do i access object

2007-01-03 Thread Alan Gauld
"Ketan Maheshwari" <[EMAIL PROTECTED]> wrote > of this class created using a constructor. The constructor > essentially > creates the circles and the update mathod makes them move randomly. > However, at each updation, I want to access each circle to know its > coordinates. At the moment I am no

[Tutor] how do i access object

2007-01-03 Thread Ketan Maheshwari
Hi All I have this code from the web that I modified according to y requirements. It has a class called Circle. Then there are a few objects of this class created using a constructor. The constructor essentially creates the circles and the update mathod makes them move randomly. However, at eac