Re: problems generating code from dia 0.96 to 0.97

Hi Ottavio,

On 02/08/2012 11:40 AM, Ottavio Campana wrote:
                         for o in layer.objects :
                                 for c in o.connections:
                                         for n in c.connected:
                                                 if not in
("UML - Association"):


It works perfectly on dia 0.96 . But when I try to run it in dia 0.97
c.connected is always empty.
Could you add another loop over n? e.g.

for co in n:
    if not in ("UML - Association"):

I also have another question: suppose I want to make my python plugin
work both with dia 0.96 and 0.97. Is there a way to get the version of
dia in the plugin?
At a first glance, I didn't see any Python function returning a Dia version number. But you could simply
check the object type where the code differs



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]