Forum Archive

I've got a very strange TypeError when invoking update (self.dt)

mirko

Hello there

The following as been verbatim copied from the Cards.py example:

self.root_layer.update(self.dt)
self.root_layer.draw()

Since a moment, I get a lot of TypeError which point to the 1st line.
Sounds like update is sometime seen as a Boolean which cannot been invoked as a function.

If I put it in a try: / except TypError: block, it's okay, but ugly.

I thought I'd share that as a bug report.

omz

Is it possible that you use an attribute named update somewhere in your own code? (it might be overriding the built-in method)

mirko

Hello

Thanks for your answer.

I just checked: no.
I have 2 methods called update_something() but no variable named so.

I must say I have a lot of trouble understanding the TextLayer from the examples: it could be nice to have a nice tutorial among the examples.

I'd also like to know why layers I remove remain on screen?