Book a Demo

Author Topic: Rename class - Possible bug  (Read 3150 times)

Miguel Gonzalez

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Rename class - Possible bug
« on: December 03, 2010, 10:05:43 am »
I would like to confirm if the following is a bug or if I am doing something wrong.

I create a class for which later I auto-generate its code by hitting F11.

Later on I rename the name of the class to something else. I hit F11 again and its code is generated but its filename is still the name for the class at creation time, it does not create a file with the new class' name.

I have tried deleting all the generated files but still behaves the same.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Rename class - Possible bug
« Reply #1 on: December 03, 2010, 10:19:59 am »
When you first generate a class a filename property is set for that class.

To my knowledge EA never attempts to change that filename when the class name is changed.  (Also as far as code engineering is concerned they are different classes.)

Miguel Gonzalez

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Rename class - Possible bug
« Reply #2 on: December 03, 2010, 10:24:22 am »
Is that filename property accessible from within EA?

I believe that more often than not users of EA would prefer the filename to be changed when the class name is changed.

I think it could be an improvement having this filename changed.

Miguel Gonzalez

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Rename class - Possible bug
« Reply #3 on: December 03, 2010, 10:32:57 am »
A workaround will be by generating the code (F11) for the renamed class, the "Generate Code" dialog window will open.

On this dialog, hit the ellipsis button for the file's path, a "Save As" dialogue window will open this time with the new filename on it. Accept and then you are good to go.

But this is a process you have to do manually one-by-one, I still believe it will be better to have that filename automatically changed.