Recent

Author Topic: duplicate name component already exist errors.  (Read 4822 times)

georgelappies

  • New Member
  • *
  • Posts: 35
duplicate name component already exist errors.
« on: July 04, 2011, 12:20:53 pm »
Hi all

I want to change properties of an editbox or caption of a labelbox with this code:
Code: [Select]
procedure TfrmWalkthru.FormShow(Sender: TObject);
begin
  edtUserID.Text:= USERID_SAS;
end;

But it keeps giving me an error saying that the name is a duplicate...

Please any help will be much appreciated.
« Last Edit: July 04, 2011, 01:49:58 pm by georgelappies »

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: duplicate name component already exist errors.
« Reply #1 on: July 04, 2011, 01:43:33 pm »
I see nothing bad with the code you sent. If you duplicate identifier then you have to check your declarations.
Possible reason: Pascal is NOT case sensitive, so 'edtUserID: TEdit' make conflict with 'EDTUserID: TEdit'.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

georgelappies

  • New Member
  • *
  • Posts: 35
Re: duplicate name component already exist errors.
« Reply #2 on: July 04, 2011, 02:07:11 pm »
Found the error, I left a
Code: [Select]
frmWalkthru.Create(frmLogin); statement before making the form visible as well as setting the form to be auto created  :-[

 

TinyPortal © 2005-2018