Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread EWB form designer and code out of sync
Sun, Dec 11 2011 12:18 PMPermanent Link

Raul

Team Elevate Team Elevate


Just ran into something:
- create a new form and save it
- in code rename the form definition (change TForm2 = class(TForm) to
TMyForm = class(TForm)), declaration and also auto-create in actual
project code to match new class name/var name.

Form works fine  and everything compiles but if you add any controls to
the form they are in form designer but do not get reflected in code
underneath.

Compile results in expected "referenced variable, parameter, or function
"Edit1" does not exist (in this case i dropped edit control on form).

Manually adding it into the code (Edit1:TEditWinkfixes it but form
designed and code are out of sync now (deleting control does not remove
the manually added code line for example).

Raul
Sun, Dec 11 2011 12:24 PMPermanent Link

Raul

Team Elevate Team Elevate

Never mind - my bad.

Discovered the object inspector still used old name for the form.

As long as i rename the form variable using object inspector (and not
directly in code) things work ok.

Raul

On 12/11/2011 12:18 PM, Raul wrote:
>
> Just ran into something:
> - create a new form and save it
> - in code rename the form definition (change TForm2 = class(TForm) to
> TMyForm = class(TForm)), declaration and also auto-create in actual
> project code to match new class name/var name.
>
> Form works fine and everything compiles but if you add any controls to
> the form they are in form designer but do not get reflected in code
> underneath.
>
> Compile results in expected "referenced variable, parameter, or function
> "Edit1" does not exist (in this case i dropped edit control on form).
>
> Manually adding it into the code (Edit1:TEditWinkfixes it but form
> designed and code are out of sync now (deleting control does not remove
> the manually added code line for example).
>
> Raul

Image