Book a Demo

Author Topic: Computed properties - a question and a bug  (Read 2679 times)

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Computed properties - a question and a bug
« on: February 08, 2005, 02:13:02 pm »
Ver 4.50.746 (beta)

Question:  Some short time ago there was a discussion of whether properties should be treated differently to methods in class diagrams.  I have tried various searches but cant find it.  Does anyone remember what the topic was?

Bug(s): Let P be a class property whose value is computed - i.e. there is no associated private attribute.  Reason dictates that it is a readonly property.  When I RevEng it from C# EA creates the correct representation:

<<property>> int P with tag readonly=true and no associated attribute.

Now here's the twist - we have now decided to expose a setter for the property. (Why is complex - let's just say we want to persist a value passed in)

I have tried both setting the readonly tag to false and deleting the tag.  On forward engineering - back into the existing source - the setter method is not added.

Can anyone see why this would not be a bug?


tia
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Computed properties - a question and a bug
« Reply #1 on: February 08, 2005, 06:26:06 pm »
Because the setter method is inside the body of the operation which is never synchronised.

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Computed properties - a question and a bug
« Reply #2 on: February 08, 2005, 09:24:00 pm »
hmmmmm.   :(
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.