From: "Dolores Alia de Saravia" <Loli unsa edu ar>
To: dia-list gnome org
Subject: Re: No unique IDs for objects??
Date: Tue, 29 May 2001 11:46:27 -0300
On Friday 25/05/2001, Lennon Day Reynolds wrote:
> In trying to add text annotation support for several plugin object
> types, I've come up against a bit of a quandry, which I hope someone
> here will be able to answer for me. First off, I can't seem to find
> where the numeric 'id' attribute values present in the Dia XML output
> are generated; I'm assuming they're simply assigned in a linear
fashion
> by iterating through the objects in each layer, but haven't found the
> code where it happens. Secondly, assuming that my assumption about how
> the id attribute is assigned is valid, I'm sort of stuck on trying to
> get annotations working in general fashion.
>
> Ideally, I'd like to have an identifier (number, string, or otherwise)
> that would stay with an object through its entire lifecycle (create,
> save, load, etc.); this would help immensely in keeping the annotation
> text tied to a certain object, as well as in trying to process the
> output files with an external filter. At this point, I'm thinking that
I
> may just have to define a new AnnotatedObject type, which has an 'id'
> property which I can use to correlate objects to notes from outside
the
> standard property editor. That, however, means I lose access to the
> SVG-defined object types for my plugin.
>
> Would it be too extreme a change for me to dig into the base Object
type
> definition and operations, and add a simple integer ID field? As a
> starting point, the values could just be generated by incrementing a
> counter in the current diagram. Are there any other areas of the
> application that could benefit from this kind of secondary handle to
an
> object?
>
> Thanks,
>
> Lennon Day-Reynolds
> Software Engineer
> Kestrel Institute
>
This is not an answer to your questions, but may be an ampliation of
them.
I am a very recent user of Dia (and very happy with it), and
really need:
1) each object be identified with a "user identification"
-one visible by the user when looking at the diagram-.
2) each object be associated with some attributes: some numerical
values and some strings.
3) to associate the user identification with the internal id property in
order to taking into account the connections of each object
with the others.
I dont care about whether the "id" property of an "user identified
object" remains the same through all possible editions of the diagram:
just now, I assume the association of both identifications is my
responsability each time I read the XML-archive. (I dont find convenient
to remember the internal id from one reading of the XML-archive to next;
especially, because may be I will have to read that archive just once.)
But may be it could be nice to choose that the user identification be
automatically generated by Dia (just as it is done for some objects of
GRAFCET sheet,"regular step", for instance). And, of course, that this
property, together with the possibility of attributes, (such as the
object "OBJ" of the UML sheet), could be given to the "user generated
shapes"; right now theese "user generated shapes" admit just one
"textbox".
> Dia-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/dia-list
>
>
loli
Sent using NeoMail, a web-based e-mail client.
http://neomail.sourceforge.net