Book a Demo

Author Topic: Renamed param but on code generation still newVal  (Read 3950 times)

sergeda

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Renamed param but on code generation still newVal
« on: April 19, 2014, 06:17:56 pm »
Hello.
After renaming param for function on PHP code generation I've got:
Code: [Select]
     public function setCreated_by($data)
      {
            $this->Created_by = $newVal;
      }

Where "data" is the new name for param. Why still newVal in the function?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Renamed param but on code generation still new
« Reply #1 on: April 19, 2014, 06:29:24 pm »
Probably because it's code which is not really interpreted by EA. You would need to correct the code body manually.

q.

sergeda

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Renamed param but on code generation still new
« Reply #2 on: April 19, 2014, 06:56:23 pm »
Quote
Probably because it's code which is not really interpreted by EA. You would need to correct the code body manually.

q.

But code generated based on some rules and if it used correct param name in one place I think it shouldn't be problem to use it in another place. To me it looks like a bug.
« Last Edit: April 19, 2014, 06:56:58 pm by sergeda »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Renamed param but on code generation still new
« Reply #3 on: April 19, 2014, 11:29:33 pm »
It's like a one way. Code being generated is just spit out, never read back. Only the class definition is read by EA.

q.
« Last Edit: April 19, 2014, 11:29:45 pm by qwerty »

sergeda

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Renamed param but on code generation still new
« Reply #4 on: April 20, 2014, 02:50:25 am »
Quote
It's like a one way. Code being generated is just spit out, never read back. Only the class definition is read by EA.

q.

Thanks for info.

Nizam Mohamed

  • EA User
  • **
  • Posts: 193
  • Karma: +1/-0
    • View Profile
Re: Renamed param but on code generation still new
« Reply #5 on: April 21, 2014, 03:08:43 pm »
Have you tried using String concat
something like
$sOpCode1 = "$this->Created_by" + "=" + $newVal
$sOpCode1