Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: sergeda on April 19, 2014, 06:17:56 pm

Title: Renamed param but on code generation still newVal
Post by: sergeda 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?
Title: Re: Renamed param but on code generation still new
Post by: qwerty 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.
Title: Re: Renamed param but on code generation still new
Post by: sergeda 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.
Title: Re: Renamed param but on code generation still new
Post by: qwerty 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.
Title: Re: Renamed param but on code generation still new
Post by: sergeda 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.
Title: Re: Renamed param but on code generation still new
Post by: Nizam Mohamed on April 21, 2014, 03:08:43 pm
Have you tried using String concat
something like
$sOpCode1 = "$this->Created_by" + "=" + $newVal
$sOpCode1