if (testComponent <> nil) Eğer ki bir bileşenin boş mu (NULL) kontrolünü bu şekilde yapılır.
Otamatik bir tolerasyon işlemi eğer ki hiç tanımlamazsanız örnek vermek gerekirse
var testLabel : TclLabel; testString : String; MyForm : TCLForm; { MyForm = TCLForm.Create(Self); if (testString == '') { ShowMessage('testString boş'); testString = 'TEST BAŞARILI' } else { testString = 'TEST BAŞARISIZ' } testLabel = MyForm.AddNewLabel(MyForm,'testLabel',testString); testLabel.StyledSettings = ssFamily; testLabel.TextSettings.Font.Size = 20; testLabel.Width = 250; MyForm.Run; } çözüm olarak alttaki tarzda önceden tanımalamak gerekir. var testLabel : TclLabel; testString : String; MyForm : TCLForm; { // Bu şekilde önceden main blok kısmında tanımlanabilinir kontrol için testString = ''; MyForm = TCLForm.Create(Self); if (testString == '') { ShowMessage('testString boştu artık TEST BAŞARILI'); testString = 'TEST BAŞARILI' } else { testString = 'TEST BAŞARISIZ' } testLabel = MyForm.AddNewLabel(MyForm,'testLabel',testString); testLabel.StyledSettings = ssFamily; testLabel.TextSettings.Font.Size = 20; testLabel.Width = 250; MyForm.Run; }
. https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">
|