PDA

View Full Version : Help writing screenlets?


mots
August 17th, 2007, 01:31 AM
Hi, I'm trying to write my first screenlet, but I have some problems:
1. Why do I get empty strings/tuples from the print-commands at line 36/37? How do I get it to print the info I entered?
2. Is there sth like FileOption but for directories?

http://paste.pocoo.org/show/2556/
Yeah I know the code is a mess, I know that I imported lots of unused things, and there might be spelling/grammar mistakes. This isn't the kind of code I'd normally post on a public board, but as theres no way of contacting RYX using an IM, this seems to be the only possible solution...

RYX
August 17th, 2007, 06:10 PM
Hi!

It prints an empty value because your vars account, categories and downloaddir are all empty :)

While you are inside the constructor the settings haven't been applied yet and all values contain the defaults you set in the class. The next version will include an on_init-function which gets called after all settings have been loaded.

(You could send me private e-mails, but I think it is better to have questions about screenlets development being answered in public so everyone can benefit from it ...)

:)

RYX
August 17th, 2007, 06:11 PM
Concerning the FileOption for directories - I'll have a look at it, it can't be difficult to add (either to FileOption or as new class) and would be a useful improvement.

:)