Book a Demo

Author Topic: Interface class and properties  (Read 5738 times)

ceatley

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Interface class and properties
« on: May 23, 2004, 01:41:26 pm »
 :(   I am designing an interface (abstract) class with the language set to C#.  In order to add an abstract property I add an attribute. Select the Property check box and then fill in the popup.  If I turn off the set check box and check the abstract checkbox then press ok and then reopen the modifies properties dialog box. The changes I made no longer exist. The get and set checkboxes are checked and the abstract check box is off.  Also, and interface can not have any variables so the attributes should be empty and only the property should be showing.   Trying to set the property using the interfaces button on the context menu doesn't seem to work.   What am I doing wrong?

Thanks
Chuck

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Interface class and properties
« Reply #1 on: May 23, 2004, 05:22:23 pm »
Hmm,

I've never worried about this, I just delete the attribute after creating the property.

An alternate is to:

1) create a method, say PropB with a return type of say int.
2) check the abstract box and set the stereotype to "property".
3) add a tag "readonly" with a value 1.

(Depends on whether you've still got the scope bug!)

4)  generate the code and go through it setting the scope on the properties.


hth
Bruce

« Last Edit: May 23, 2004, 05:22:40 pm by sargasso »
"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.