I'm not too sure about this one Paolo,
IMO you are quite correct across the board. But you are also getting dangerously close to suggesting a rewrite, or at least an extension, of the shape script facility. I've been nudging (gently and otherwise) Sparx on this since they first appeared in beta form. I note that the scripting language version has not evolved.
[size=18]...[/size]
I should have been a bit clearer. The reference to shapescripts was almost a throwaway. (and as usual throwaway are what get us into...)
Firstly, the issue of styles is principally for manual operation and application. I want to be able to define the style (which I now pretty much can - some minor consistency tweaks are needed but the technology is OK).
Next we need a mechanism to associate the style with the item - but not as present (by placing an instance of the style definition -
as specified at the time!), but by placing an indirect reference to the style (style=<name>). This allows the item to reference the current manifestation of the style. Perhaps, an option could be provided to place a
snapshot of the style (as at present).
Obviously, as the style definition changes, the items would be re-rendered.
Now, shapescripts are behavioural - so style definition (declarative) shouldn't be part of that. I'm just proposing a setstyle(<name>) method to set the fill,border and font colours and pen width (as though I'd issued the equivalent setfillcolor(), setpen() commands).
Style definition would have to be via an additional API call.
I really don't see how it's a major step from the existing - since the styles are already stored in the DB. I'll even wait for the import export if I can get the actual application of the
dynamic style sooner.
Paolo