diff options
author | Marion <marion.zepf@gmail.com> | 2013-09-02 20:05:22 (GMT) |
---|---|---|
committer | Marion <marion.zepf@gmail.com> | 2013-09-02 20:05:22 (GMT) |
commit | dad6e183fe30339a6bb450ee8e9a02fe534dbb32 (patch) | |
tree | 1c87e7f251fb4f5a71e705da11f177763e85eab4 | |
parent | 567b1cd19cb4c7a1af81e634283da3059a5dbf07 (diff) |
update Primitive for the 'forever' block; disable expansion of 'forever'
-rw-r--r-- | TurtleArt/tabasics.py | 5 | ||||
-rw-r--r-- | TurtleArt/talogo.py | 12 |
2 files changed, 9 insertions, 8 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py index 5c7604e..db27eaf 100644 --- a/TurtleArt/tabasics.py +++ b/TurtleArt/tabasics.py @@ -855,8 +855,9 @@ number of seconds')) help_string=_('loops forever')) self.tw.lc.def_prim('forever', 1, Primitive(self.tw.lc.prim_loop, - constant_args={0: Primitive(Primitive.controller_forever, - call_me=False)}), + arg_descs=[ + ConstantArg(Primitive(Primitive.controller_forever)), + ArgSlot(TYPE_OBJECT, call_arg=False)]), True) primitive_dictionary['repeat'] = self._prim_repeat diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py index 35fe04a..b677c1b 100644 --- a/TurtleArt/talogo.py +++ b/TurtleArt/talogo.py @@ -249,12 +249,12 @@ class LogoCode: blocks = new_blocks[:] if b == blk: blk = action_blk - for b in blocks: - if b.name in ['forever']: - action_blk, new_blocks = self._expand_forever(b, blk, blocks) - blocks = new_blocks[:] - if b == blk: - blk = action_blk +# for b in blocks: +# if b.name in ['forever']: +# action_blk, new_blocks = self._expand_forever(b, blk, blocks) +# blocks = new_blocks[:] +# if b == blk: +# blk = action_blk for b in blocks: if b.name in ('hat', 'hat1', 'hat2'): |