zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #01101
writing plugins
-
To:
zim-wiki@xxxxxxxxxxxxxxxxxxx
-
From:
Alessandro Magni <magni@xxxxxxxx>
-
Date:
Thu, 10 Feb 2011 09:13:00 +0100
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Thunderbird/3.1.7
hi people,
it is a bit of time since I'm thinking about trying to write some simple
plugin - to start with, I wanted to try with an <insert GNUplot plot>,
since I prefer GNUplot in place of R.
I read in the manual to check the HACKING directory, and I tried to
follow the code in gnu_r_ploteditor.py to take it as example.
I don't know if it is me, but I probably lack a good understanding of
the basics.
I have in gnuplot_ploteditor.py three classes (InsertGNUPlotPlugin,
InsertPlotDialog, PlotGenerator), I have a template _gnuplot.gnu in
place, and I have basically changed gnu_r_ploteditor.py as less as
possible, just to call gnuplot instead of R.
In Zim I have now a Insert->GNUplot option, which calls up an insert
window. But any code I use inside it returns a "Looks like you found a
bug" window, telling me "AttributeError: 'NoneType' object has no
attribute 'basename' "
Of course you have better things to do than lead me by the hand thru
Python development, but - since the HACKING folder is a bit lacking -
could you tell me exactly what is expected from a zim plugin, in terms
of defined classes etc?
Also, what you do suggest as tricks to debug it?
Thank you!
alessandro
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ Dr.Alessandro Magni
\ Electromagnetics Division
/ INRiM Strada delle Cacce 91, 10135 Torino (ITALIA)
\ Email magni@xxxxxxxx
/ Tel: 0039-011-3919821 Fax: 0039-011-3919834
\ URL http://www.inrim.it/~magni
/ Our business in life is not to succeed but to continue to fail
\ in high spirits. -- Robert Louis Stevenson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Follow ups