Book a Demo

Author Topic: Read/write DiagramObject Style please  (Read 3346 times)

gtsoftware

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Read/write DiagramObject Style please
« on: March 28, 2006, 05:20:28 pm »
I've seen other folks struggling with the DiagramObject Style and I fell over the write-only nature of the Style.

I find any write only properties unacceptable. I don't see any reason for these display settings to be write only, so please can they be readable too.

My application is for user changes in class colouring to be picked up by my VB app and remembered for the next time that exact same class is generated in a model. At the moment I don't have any workaround  :(

Colin

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Read/write DiagramObject Style please
« Reply #1 on: March 29, 2006, 06:17:34 am »
As a workaround...

Create a channel to your model's underlying database via whatever data access technology you develop with. You can now read the appropriate field and parse the string.

You would be best to perform any transformation magic by modifying a copy of the string in your appilcation.

I suggest you set the Style() property of the DiagramObject to apply your changes. This way you are (a bit) insulated from from changes to the way Sparx handles the rendering process. I can imagine way in which they could extend the Style settings, and they might eventually propagate these settings to other fields when next the repository schema changes.

I do however agree with you that this is a nuisanse. You should put this forth as a suggestion. In that light it might be best to concentrate on those aspects of the product that could be improved, rather than categories of things that are "unacceptable." This might allow developers to better evaluate the suggestion on its merits.
No, you can't have it!