Book a Demo

Author Topic: changing attribute scope and regenerating code  (Read 2786 times)

PhilG

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
changing attribute scope and regenerating code
« on: March 27, 2003, 06:54:10 am »
Hello
I am a new user to EA, but am very impressed so far.
However, I have one problem/question:

I created a class with a public attritbute.
I generated C++ code. Fine so far.
I changed the attribute scope to protected.
I regenerated the C++ code.
The attribute remained in the public section of the header file.

Am I doing something wrong?

Thanks
PhilG

Tjerk

  • EA User
  • **
  • Posts: 231
  • Karma: +1/-0
    • View Profile
Re: changing attribute scope and regenerating code
« Reply #1 on: March 28, 2003, 12:35:53 am »
Hi Phil,

One of the things you might wanna try is to set the overwrite (instead of synchronise) option. Note, this will throw away your existing implementation for the class, but it should give you proper results right from the model.

I'm not sure whether or not this will help, but please try and report the results. It could still be a bug.

Greetings,
Tjerk

PhilG

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: changing attribute scope and regenerating code
« Reply #2 on: March 28, 2003, 12:53:30 am »
Hi

Yes, overwriting rather than synchronising did put the attribute in the correct section, but it also overwrite the CPP file, thus wiping out all my implementation.

This wouldn't be so bad if you could select "Generate Header File Only".

But the best option (for me  ;)) would be to have EA move the attribute declaration to the correct section when synchronising.

Thanks
Phil