Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#240 closed defect (fixed)

[portfolio] named variables cause errors in "+="

Reported by: sprinkmeier Owned by: walter
Priority: normal Milestone:
Component: Turtleart Version: Unspecified
Severity: Minor Keywords: portfolio
Cc: Distribution/OS: Unspecified
Bug Status: Assigned

Description

Doing the block=equivalent of

foo = foo + 100

fails with the error below:

TypeError: 'str' object is not callable
space, 32<flags 0 of type GdkModifierType>
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/olpc/Activities/TurtleArtPortfolio.activity/tawindow.py in keypress_cb(area=<gtk.EventBox object at 0x9f86cd4 (GtkEventBox at 0xa3e4340)>, event=<GdkEvent at 0xa3e4390>, tw=<tawindow.taWindow instance at 0x9f76bcc>)
    442     if tw.firstkey: newnum = selblock.check(keyname,tw.defdict[selblock.name])
    443     else: newnum = oldnum+keyname
--> 444     setlabel(tw.selected_block, selblock.check(newnum,oldnum))
        global setlabel = <function setlabel at 0xb609317c>
        tw.selected_block = <tasprites.taSprite instance at 0xa16cfcc>
        selblock.check = ''
        newnum = 'None '
        oldnum = 'None'
    445     tw.firstkey = False
    446     return True

the equivalent 'code' works with box1 and box2

Change History (4)

comment:1 Changed 15 years ago by walter

  • Status changed from new to accepted

This is fixed as of Version 7 (with the new arithmetic operators). I haven't propagated the changes back into Turtle Art yet--awaiting feedback from the field as to whether the new approach is OK with the teachers.

comment:2 Changed 15 years ago by gregdek

  • Bug Status set to Assigned
  • Distribution/OS set to Unspecified
  • Milestone set to 0.86
  • Severity set to Minor

Moving to 0.86.

comment:3 Changed 15 years ago by walter

  • Resolution set to fixed
  • Status changed from accepted to closed

fixed since new arithmetic operators in place

comment:4 Changed 11 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.