> -----Ursprüngliche Nachricht-----
> Von: dia-list-admin@gnome.org [mailto:dia-list-admin@gnome.org]Im
> Auftrag von Hans Breuer
> Gesendet: Sonntag, 8. Juli 2001 16:39
> An: dia-list@gnome.org
> Betreff: Re: python plugin and object properties
>
>
> >i comiled dia 0.88.1 from source with the --with-python option.
> >dia.active_display().diagram.layers[0].properties.get("obj_pos") returns
> >always None.
> Doesn't it give a runtime-error AttributeError: properties ?
yes, sorry i did not write it the right way:
it was:
dia.active_display().diagram.layers[0].objects[0].properties.get("obj_pos")
> dia.active_display().diagram.layers[0].objects[0].properties['obj_
> pos'].value
> works:
> <DiaPoint object at ...>
yes, thanks...
> >i doesn't matter which property i want to get. it doesn't work for all.
> >any ideas?
> There is probably no senseful way to write Dia Extensions in
> Python without
> being able to read and understand the C-Sources
i just saw with dir(dia.active_display...) that properties object supports
the
get method and this always returns None.
>
> >are there any docs for the python plugin?
> NAFAIK. I've attached a small interface description extracted from the
> C-Source, no real documentation :(
thanks a lot...
>
> >is it possible to use the dia api not only in the python dia console?
> >
> Yes. There are two examples how to write an export filter in Python, but
> again I don't think it would be much fun to write one, without being able
> to debug or 'investigate the limitations in' the Python-Plugin as well.
>
> The Plugin will probably remain such limited as it is, at least until it
> (and first the Dia Object System) is converted to Gtk+2.0 especially the
> GObject system, because the current access does not allow to ref-count the
> objects, to easily back-propagate property changes, etc. ...
the conversion will take some time, won't it?
thanks a lot
michael