Re: ID Recalculation
- From: Luis Villa <lvillap gmail com>
- To: discussions about usage and development of dia <dia-list gnome org>
- Subject: Re: ID Recalculation
- Date: Mon, 14 Dec 2009 17:27:01 +0100
Hello,
I've been trying to use this technique to maintain a id. I got it right for "Flowchart - Box" items, but I couldn't use it in (for example) "UML - Actor". It seems it looses the <dia:attribute name="meta"> node. In other types as "Flowchart - Off Page Connector", the tree results in
<dia:attribute name="meta">
<dia:composite type="dict">
</dia:attribute>
after saving. Is this a bug?
Thank you very much and, again, congratulations for your good work! :)
Regards
2009/12/10 Luis Villa
<lvillap gmail com>
Is it possible to change Dia not to do this recalculation?
Not without an extra layer of complexity I'd like to avoid. The main issue would be to ensure the uniqueness of such an id during copy, maybe even across different diagrams. Also there arise questions when to change the object id (if stored in a different diagram, on change of all object properties or only if it's name would change, etc. pp.)
Without knowing your exact use case it might be possible for you to generate your own object id and store it as
<dia:attribute name="meta">
<dia:composite type="dict">
<dia:attribute name="some-id">
<dia:string>#123#</dia:string>
</dia:attribute>
</dia:composite>
</dia:attribute>
Of course that would also not solve the issues I mentioned above regarding uniqueness. The content of the 'dict' is not changed by Dia, there even is no user interface to do so at the moment.
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
Hello Hans :)
Yes, this xml block should do it. Regarding uniqueness I can manage it out of dia. I'll simply preprocess the file everytime I read it.
Thank you very much :)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]