From 6e8e6c49597b2833ce68e0e9db46117818320d20 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 23 Jan 2010 22:55:16 +0000 Subject: fixed bug in basic block with 2args --- (limited to 'tawindow.py') 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' -- cgit v0.9.1