![]()  | 
 
| Clomosy Resmi Forum Sitesidir. Amacımız kullanıcılarımıza, iş ortaklarımıza, danışmanlara, yazılımcılara programlarımız hakkında destek ve bilgi vermektir. | 
Pos fonksiyonu sonucu if e girmiyor. | 
 
    Yanıt Yaz  
   | 
  
| Yazar | |
   
   ElifKarabacak  
   
   Yeni Üye  
   Kayıt Tarihi: 16 Eylül 2024 Durum: Aktif Değil Puanlar: 20  | 
  
   
      Mesaj Seçenekleri
    Yanıt Yaz 
     Alıntı ElifKarabacak 
     Bu mesaj kurallara aykırıysa buradan yöneticileri bilgilendirebilirsiniz.  
      Teşekkürler(0)
      Alıntı   Cevapla
   
     Konu: Pos fonksiyonu sonucu if e girmiyor.Gönderim Zamanı: 21 Kasım 2024 Saat 15:44  | 
 
| 
   
    Aşağıdaki kodda 'idgridac' fonksiyonunda  Pos ile '{ ' karakterini ana stringde bulamadığı zaman aşağıdaki if e girmesi lazım ama girmiyor. Yardımcı olabilir misiniz? " if (Position <= 0) " var jsonObject:TClJsonQuery; clRest:TclRest; mainform: TclForm; progrid: TclProGrid; mainvertScrollBox: TCLVertScrollBox; idstr:String; firstName:String; FSenderId:TCLProGrid; FRowId, FColId : Integer; mainform2:TclForm; mainvertScrollBox2:TCLVertScrollBox; jsonObject2:TClJsonQuery; progrid2:TCLProGrid; Position: Integer; void idgridac; {   FSenderId = TCLProGrid(mainform.ClSender);   FRowId = mainform.ClSenderRow; // 1 den başlıyor satırlar   FColId = mainform.ClSenderCol; //0 dan başlıyor sütunlar   ShowMessage('['+IntToStr(FRowId)+','+IntToStr(FColId)+'] '+'Hücresinde Bulunan Veri: '+FSenderId.Cells[FColId,FRowId]);   mainform2 = TclForm.Create(self);   ClRTSetProperty(mainform2,'ClientWidth',900);   ClRTSetProperty(mainform2,'ClientHeight',750);   mainvertScrollBox2 = mainform2.AddNewVertScrollBox(mainform2,'mainvertScrollBox2');   mainvertScrollBox2.align=alClient;   try     jsonObject2 = Clomosy.ClDataSetFromJSON(FSenderId.Cells[FColId,FRowId]);      jsonObject2.openorexecute; ShowMessage(FSenderId.Cells[FColId,FRowId]);     with jsonObject2 do     {       if (Found)        {         First;          while (not EOF)           {               Position = Pos('{', FSenderId.Cells[FColId,FRowId]);    if (Position >= 0)    {       ShowMessage('Substring not found.');    }        else       {       ShowMessage('Substring found. Position: ' + IntToStr(Position));        progrid2 = mainform2.addnewprogrid(mainvertScrollBox2, 'progrid2');                progrid2.AutoSizeColumns(True,300);                ProGrid2.ConnectDataSet(jsonObject2);                  with progrid2 do                   {                     align= alClient;                     margins.right= 30;                     margins.left= 30;                     margins.bottom= 30;                     // width=(mainform.clwidth*90)/100;                     //height=(mainform.clheight*75)/100;                     FixedLayoutFillColor = clalphacolor.clhextocolor('#3fc660');                   }             ShowMessage(FieldByName('address').AsString);             //    mainform2.AddNewEvent(progrid2, tbeOnProGridCellClick,'idgridac2');       }           Next;          }       }       }        except  ShowMessage('Exception Class2: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage);     }   mainform2.run; }  void usersgrid;  {   clRest         = TclRest.Create;   jsonObject     = TClJsonQuery.Create(nil);   clRest.BaseURl = 'https://dummyjson.com/users/1';   clRest.Accept  = 'application/json';   clRest.Method  = rmGet;   clRest.Execute;    ShowMessage(clRest.Response);    try     jsonObject = Clomosy.ClDataSetFromJSON(clRest.Response);      jsonObject.openorexecute;     with jsonObject do     {       if (Found)        {         First;          while (not EOF)           {                progrid = mainform.addnewprogrid(mainvertScrollBox, 'progrid');                progrid.AutoSizeColumns(True,300);                ProGrid.ConnectDataSet(jsonObject);                  with progrid do                   {                     align= alClient;                     margins.right= 30;                     margins.left= 30;                     margins.bottom= 30;                     // width=(mainform.clwidth*90)/100;                     //height=(mainform.clheight*75)/100;                     FixedLayoutFillColor = clalphacolor.clhextocolor('#3fc660');                   }             ShowMessage(FieldByName('id').AsString);                 mainform.AddNewEvent(progrid, tbeOnProGridCellClick,'idgridac');           Next;          }       }       }        except  ShowMessage('Exception Class1: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage);     } } {   mainform = TclForm.Create(self);   ClRTSetProperty(mainform,'ClientWidth',900);   ClRTSetProperty(mainform,'ClientHeight',750);   mainvertScrollBox = mainform.AddNewVertScrollBox(mainform,'mainvertScrollBox');   mainvertScrollBox.align=alClient;   usersgrid;     mainform.Run; }  | 
 |
![]()  | 
 |
   
   BilalCndn  
   
   Forum Yöneticisi  
   Kayıt Tarihi: 09 Ekim 2023 Durum: Aktif Değil Puanlar: 192  | 
  
   
      Mesaj Seçenekleri
    Yanıt Yaz 
     Alıntı BilalCndn 
     Bu mesaj kurallara aykırıysa buradan yöneticileri bilgilendirebilirsiniz.  
      Teşekkürler(1)
      Alıntı   Cevapla
   
     Gönderim Zamanı: 21 Kasım 2024 Saat 17:18 | 
 
| 
   
    
   Merhaba Elif, 
   
  Bu şekilde bir dener misin? 
 İyi çalışmalar dilerim. 
    | 
 |
| 
   
     
     Bilal Candan 
   
  Atiker Yazılım Veri İşlem A.Ş. Software and Artificial Intelligence Development Specialist [email protected]  | 
 |
![]()  | 
 |
    Yanıt Yaz  
   | 
  |
| Tweet | 
| Forum Atla | Forum İzinleri  ![]()  Kapalı Foruma Yeni Konu Gönderme Kapalı Forumdaki Konulara Cevap Yazma Kapalı Forumda Cevapları Silme Kapalı Forumdaki Cevapları Düzenleme Kapalı Forumda Anket Açma Kapalı Forumda Anketlerde Oy Kullanma  |