Talk:Paths/Developer/Creating plasmoids with scripts

Jump to: navigation, search

Errors in Python code

There are numerous errors in the Python script. Running it gives:

 File "", line 14
   self.svg =
SyntaxError: invalid syntax

Which is of course quite obvious, since the :: is a C++ operator and not Pthon. The @top is also not Python syntax. Furthermore, the call to 'preparePainter' is done before the function itself is defined, which is also impossible.

Cheers, Sybren Stüvel -- sybren AT stuvel DOT eu

Actually it's not a c++ call, and you're right, @top is not python either. They're both ruby syntax. I've obviously been playing to much with ruby lately. Furthermore, the call to preparePainter is fine, it's defined on the object. Objects are fully aware of all their own members whether defined before or after the function calling them. Anyway, the script is fixed. It does work now.. tested in 4.2Rc1.

There are no threads on this page yet.

This page was last modified on 18 January 2009, at 01:21. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2 unless otherwise noted.