Changes

Jump to navigation Jump to search
Line 697: Line 697:  
See the file TurtleArtActivity.py. This is where it starts. When an instance of TurtleArtActivity is created, setup_canvas() creates an instance of TurtleArtWindow: self.tw This instance of TurtleArtWindow creates an instance of  LogoCode: self.tw.lc and an instance of TurtleGraphics: self.tw.canvas
 
See the file TurtleArtActivity.py. This is where it starts. When an instance of TurtleArtActivity is created, setup_canvas() creates an instance of TurtleArtWindow: self.tw This instance of TurtleArtWindow creates an instance of  LogoCode: self.tw.lc and an instance of TurtleGraphics: self.tw.canvas
   −
tamyblock.py gets passed a LogoCode instance, lc, and everything is relative to that instance.  tw is passed to lc and set as an instance data object at init. This allows referral back to tw when needed. Consequently, Class TurtleArtWindow is accessed through lc.tw. and  
+
tamyblock.py gets passed a LogoCode instance, lc, and everything is relative to that instance.  tw is passed to lc and set as an instance data object at init. This allows referral back to tw when needed. Consequently, Class TurtleArtWindow is accessed through lc.tw. and Class TurtleGraphics is accessed through lc.tw.canvas
     
2,486

edits

Navigation menu