Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-07-01 08:38:42 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-07-01 08:38:42 (GMT)
commit1968420db0f62bdbbdc9a7e04c8fef9094dd2527 (patch)
treec2ab19cd439fc3a31afa09a5a07a0910db2efc39
parent8bc1ce4ec14ae7dfb21a750b4ff39d38e938a08c (diff)
fix broken lambda functions
-rw-r--r--TurtleArt/tabasics.py12
-rw-r--r--TurtleArt/taturtle.py1
2 files changed, 6 insertions, 7 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py
index fb2a186..ef0c449 100644
--- a/TurtleArt/tabasics.py
+++ b/TurtleArt/tabasics.py
@@ -350,7 +350,7 @@ turtle'))
'setcolor',
1,
lambda self, x: primitive_dictionary['set'](
- 'color', self.tw.turtles.get_active_turtle().set_color, x))
+ 'color', self.tw.turtles.get_active_turtle().set_color(x)))
palette.add_block('setshade',
style='basic-style-1arg',
@@ -364,7 +364,7 @@ turtle'))
'setshade',
1,
lambda self, x: primitive_dictionary['set'](
- 'shade', self.tw.turtles.get_active_turtle().set_shade, x))
+ 'shade', self.tw.turtles.get_active_turtle().set_shade(x)))
palette.add_block('setgray',
style='basic-style-1arg',
@@ -377,7 +377,7 @@ the turtle'))
'setgray',
1,
lambda self, x: primitive_dictionary['set'](
- 'gray', self.tw.turtles.get_active_turtle().set_gray, x))
+ 'gray', self.tw.turtles.get_active_turtle().set_gray(x)))
palette.add_block('color',
style='box-style',
@@ -390,7 +390,7 @@ in place of a number block)'),
self.tw.lc.def_prim(
'color',
0,
- lambda self: self.tw.turtles.get_active_turtle().get_color)
+ lambda self: self.tw.turtles.get_active_turtle().get_color())
palette.add_block('shade',
style='box-style',
@@ -402,7 +402,7 @@ in place of a number block)'),
self.tw.lc.def_prim(
'shade',
0,
- lambda self: self.tw.turtles.get_active_turtle().get_shade)
+ lambda self: self.tw.turtles.get_active_turtle().get_shade())
palette.add_block('gray',
style='box-style',
@@ -412,7 +412,7 @@ used in place of a number block)'),
value_block=True,
prim_name='gray')
self.tw.lc.def_prim('gray', 0, lambda self:
- self.tw.turtles.get_active_turtle().get_gray)
+ self.tw.turtles.get_active_turtle().get_gray())
palette.add_block('penup',
style='basic-style-extended-vertical',
diff --git a/TurtleArt/taturtle.py b/TurtleArt/taturtle.py
index 030d58d..4432204 100644
--- a/TurtleArt/taturtle.py
+++ b/TurtleArt/taturtle.py
@@ -27,7 +27,6 @@ import cairo
from random import uniform
from math import sin, cos, pi, sqrt
-
from taconstants import (TURTLE_LAYER, DEFAULT_TURTLE_COLORS, DEFAULT_TURTLE,
COLORDICT)
from tasprite_factory import SVG, svg_str_to_pixbuf