program ilk çalıştırıldığında Unit1 e tıklıyorum ve açılıyor sonrasında geri anaforma dönüp tekrar unit1 açmaya çalıştığımda hata veriyor
Kod:
var anaForm : TclStyleForm; btnUnit : TclButton; btnUnit2 : TclButton; btnUnit3 : TclButton; btnUnit4 : TclButton; Unit1 :TclUnit; Unit2 :TclUnit; Unit3 :TclUnit; Unit4 :TclUnit; lblInfo : tclLabel; void GoToUnit1; { anaForm.clShow; Unit1.UnitName = 'Unit1'; Unit1.CallerForm = anaForm; Unit1.Run; } void GoToUnit2; { anaForm.clShow; Unit2.UnitName = 'Unit2'; Unit2.CallerForm = anaForm; Unit2.Run; } void GoToUnit3; { anaForm.clShow; Unit3.UnitName = 'Unit3'; Unit3.CallerForm = anaForm; Unit3.Run; } void GoToUnit4; { anaForm.clShow; Unit4.UnitName = 'Unit4'; Unit4.CallerForm = anaForm; Unit4.Run; }
{ anaForm = TclStyleForm.Create(Self); Unit1 = TclUnit.Create; Unit2 = TclUnit.Create; Unit3 = TclUnit.Create; Unit4 = TclUnit.Create;
lblInfo = anaForm.AddNewLabel(anaForm,'lblInfo','CLOUD SHOPİNG'); lblInfo.Align = alMostTop; lblInfo.Height= 30; lblInfo.margins.left=115;
btnUnit = anaForm.AddNewButton(anaForm,'btnUnit','Ürün Ekle'); btnUnit.Align = alTop; btnUnit.Margins.Top = 30; btnUnit.Height=50; anaForm.AddNewEvent(btnUnit,tbeOnClick,'GoToUnit1'); btnUnit2 = anaForm.AddNewButton(anaForm,'btnUnit2','Ürün Düzenle'); btnUnit2.Align = alTop; btnUnit2.Margins.Top = 30; btnUnit2.Height=50; anaForm.AddNewEvent(btnUnit2,tbeOnClick,'GoToUnit2'); btnUnit3 = anaForm.AddNewButton(anaForm,'btnUnit3','Fiyat Düzenle'); btnUnit3.Align = alTop; btnUnit3.Margins.Top = 30; btnUnit3.Height=50; anaForm.AddNewEvent(btnUnit3,tbeOnClick,'GoToUnit3'); btnUnit4 = anaForm.AddNewButton(anaForm,'btnUnit4','Ürün sil'); btnUnit4.Align = alTop; btnUnit4.Margins.Top = 30; btnUnit4.Height=50; anaForm.AddNewEvent(btnUnit4,tbeOnClick,'GoToUnit4'); anaForm.Run; } Hatası: /*BasisForm*/ GoToUnit1 -------------------------------------------------------------------- TclStyleForm Unknown identifier or variable is not declared: 'GoToUnit1'. Source position: 1,9 Clomosy Build : 20240724.160233 --------------------------------------------------------------------
|