Sayfayı Yazdır | Pencereyi Kapat

Dinamik veri

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Clomosy ile değişken kullanımı
Forum Tanımlaması: TRObject dili ile değişken tanımlaması ve ekranda gösterme
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1224
Tarih: 12 Kasım 2025 Saat 18:12
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Dinamik veri
Mesajı Yazan: M-Guney
Konu: Dinamik veri
Mesaj Tarihi: 12 Kasım 2025 Saat 13:20
Dinamik olarak oluşturulmuş verinin gerekli yerlere doldurulmasında bir hata alıyorum ve dolduramıyorum. Doldurmak istediğim yerler Temp olmayan halleri.



void FillOrdersPnlV(FQry: TCLJSONQuery)
  var 
  I : Integer;
  TempProPnl : TclProPanel;
  TempProLbl, TempTableLbl, TempClockLbl, TempStateDisplayLbl : TclProLabel;
  {
    
  I = 0;
  try
  //TempProPnl = TCLProPanel(MainForm.clFindComponent(vScroll));
  with FQry do
  {
   if(Found){
    First;
    while (not EOF)  // Loop until the end of the dataset is reached
    {
  
    //TempTableLbl = TCLProLabel(MainForm.clFindComponent('TableLbl' + IntToStr(I)));
    //TempTableLbl.Text =  FieldByName('table_name').AsString; 
    clRTSetProperty('TableLbl' + IntToStr(I),'Text', FieldByName('table_name').AsString);
    
    //TempClockLbl = TCLProLabel(MainForm.clFindComponent('ClockLbl' + IntToStr(I)));
    //TempClockLbl.Text =  FieldByName('order_time').AsString;
    clRTSetProperty('ClockLbl' + IntToStr(I),'Text', FieldByName('order_time').AsString);
    
    
    //TempStateDisplayLbl = TCLProLabel(MainForm.clFindComponent('StateDisplayLbl' + IntToStr(I)));
    //TempClockLbl.Text =  IntToStr(I) + '.status' +' ' + FieldByName('status').AsString;
    clRTSetProperty('StateDisplayLbl' + IntToStr(I),'Text', FieldByName('status').AsString);
    Next;  // Move to the next record
    Inc(I);
    }
  }
  }
  except
    // If an error occurs, display the exception class and message
    ShowMessage('Exception Class: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage);
  }
  
}
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">



Cevaplar:
Mesajı Yazan: Emr.Erkmn
Mesaj Tarihi: 12 Kasım 2025 Saat 13:59
Muhtemel hata componentler henüz oluşturulmadığın da 
void FillOrdersPnlV(FQry: TCLJSONQuery)
var 
  I : Integer;
  TempTableLbl, TempClockLbl, TempStateDisplayLbl : TclProLabel;
  componentName: String;
{
  I = 0;
  
  Try
  
    with FQry do
    {
      if (Found)
      {
        First;
        
        while (not EOF)
        {
          Try
          
            TempTableLbl = MainForm.clFindComponent('TableLbl' + IntToStr(I)) as TclProLabel;
            if (TempTableLbl <> nil)
            {
              TempTableLbl.Text = FieldByName('table_name').AsString;
            }
            
            TempClockLbl = MainForm.clFindComponent('ClockLbl' + IntToStr(I)) as TclProLabel;
            if (TempClockLbl <> nil)
            {
              TempClockLbl.Text = FieldByName('order_time').AsString;
            }
            
            TempStateDisplayLbl = MainForm.clFindComponent('StateDisplayLbl' + IntToStr(I)) as TclProLabel;
            if (TempStateDisplayLbl <> nil)
            {
              TempStateDisplayLbl.Text = FieldByName('status').AsString;
            }
            
            Next;
            Inc(I);
          
          except
          
            ShowMessage('Index ' + IntToStr(I) + ' için hata: ' + LastExceptionMessage);
            Next;
            Inc(I);
          }
        }
      }
    }
    
    ShowMessage(' Veriler dolduruldu. Toplam: ' + IntToStr(I) + ' kayıt');
  
  except
  
    ShowMessage('FillOrdersPnlV hatası: ' + LastExceptionMessage);
  }
  }
clFindComponent ile bulup set etmeyi deneyelim 

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">< defer="" ="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28on72PdrCzSjY4U6VaAw1EQ==" -cf-beacon=""version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"_timing":"name":"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true,"location_startswith":null" crossorigin="anonymous">



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net