Alan Gauld wrote: > #This is now the button which is supposed to feed the PlotPanel > #the points it needs. It is a method of the wxFrame (code not shown) >> def OnButton1Button(self, event): >> #these are the points I want to be plotted when I push this button >> xpoints=[2,4,6] >> ypoints=[10,20,30] >> self.weightplot = PlotPanel(self.notebook1,xpoints,ypoints) > > But this needs to use self to access the member values: > > self.weightplot = > PlotPanel(self.notebook1,self.xpoints,self.ypoints)
A minor correction to an otherwise excellent explanation - xpoints and ypoints are not member variables here - they are ordinary local variables - so 'self' is not needed. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor