[wxPython-users] Re: ogl, changing position of a shape ?

Stef Mientki S.Mientki at ru.nl
Mon Jun 25 02:18:50 PDT 2007



Christian K wrote:
> Stef Mientki wrote:
>   
> [...]
>   
>> so it still looks perfect
>> ... but when I move the shape now I get an error
>>    print LED
>>    LED.shape.SetX(LED.shape.GetX()+20)
>> TypeError: 'float' object is not callable
>>
>> The print statement before the position change is still
>>  <device_LED.tLED instance at 0x01C37198>
>> so it looks OK.
>>
>> What does adding the object to a list change ??
>>     
>
> Absolutely nothing. The problem is elsewhere. Can you provide a runnable
> example? Or at least split that line above which causes the error so that we can
> see which object is the 'float' object. I looks like you have overridden SetX or
> GetX in your class.
>   
thanks very much Cristian,

this is the right hint that triggers the solution:

somewhere there was:
      Devices[i].shape.SetX = ini.read_integer('X',0)

which should be:
      Devices[i].shape.SetX ( ini.read_integer('X',0) )

cheers,
Stef Mientki

Kamer van Koophandel - handelsregister 41055629  / Netherlands Chamber of Commerce - trade register 41055629






More information about the wxpython-users mailing list