Re: [Re-posting] Adding object-specific properties to custom objects
From: "Marco Contenti" <m contenti libero it>
To: <dia-list gnome org>
Subject: Re: [Re-posting] Adding object-specific properties to custom objects
Date: Sun, 9 Nov 2003 23:55:53 +0100
> Proposed change to shape files (in .dtd notation)
>
> A new child type "properties" is added to the "shape" element:
[...]
> where "type" may be one of the standard property types: composite, int,
> enum, real, boolean, color, point, rectangle, string, font.
> The attribute element should be empty except for type composite.
These custom properties should work kinda like the "comment" attribute in
the UML class, in that it has rendering effect, but shows up in the
properties dialog, yes?
Yes, you mean "it has NO rendering effect", I guess.
> The code loading shape info should automatically enclose all custom
> properties in a single composite attribute (say: "custom_properties") to
> avoid namespace conflicts with existing dia:attribute tags.
[...]
> Note: this is not really a change in .dia format, since the present
> syntax already allows this construct and such a file should be loaded by
> the present Dia without problems (ignoring the custom attributes). Also
> changed .shape files shouldn't cause problems.
Why have this extra attribute? You could just have the properties
internally named e.g. "custom:foo", and they would be saved along with the
rest of the properties, quite automagically.
Good idea!
Regards.
Marco