Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-01-23 22:55:16 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-01-23 22:55:16 (GMT)
commit6e8e6c49597b2833ce68e0e9db46117818320d20 (patch)
treea1f2fabf8434c9d32634ed5e86b61c097a7df1ce /tawindow.py
parent154ff98581f12f4ec5bce7a37a15afe0d86f0a36 (diff)
fixed bug in basic block with 2args
Diffstat (limited to 'tawindow.py')
-rw-r--r--tawindow.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tawindow.py b/tawindow.py
index 4b9daa2..5e845d5 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -913,12 +913,15 @@ class TurtleArtWindow():
self.dragpos = 20, 20
newblk.connections = [None]*len(newblk.docks)
print "new block %s" % (newblk.name)
- for i in range(len(newblk.defaults)):
- dock = newblk.docks[i+1] # the first dock position is a connector
+ print newblk.defaults
+ print newblk.docks
+ for i, argvalue in enumerate(newblk.defaults):
+ # skip the first dock position--it is always a connector
+ dock = newblk.docks[i+1]
argname = dock[0]
+ print "adding block %s with value %s" % (argname, str(argvalue))
if argname == 'unavailable':
continue
- argvalue = newblk.defaults[i]
if (type(argvalue) is str or type(argvalue) is unicode) and\
argname == 'number':
argname = 'string'