--- In [EMAIL PROTECTED], "Ahmad Yadi" <[EMAIL PROTECTED]> wrote: > pada tedit.text:=''; > muncul error Mas..., sbb: > [Error] Unit1.pas(40): Method identifier expected > [Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1. pas' > > kemudian saya ganti dengan > ShowMessage( Components[i].Name); > > memang muncul 3 nama tedit component yang telah dibuat pada > saat desain time. > > so bagaimana ?, pls help...
Ok. Codingnya kurang lengkap. for i := 0 to Self.ComponentCount-1 do if Components[i] is Tedit then with Components[i] as TEdit do Text:=''; Jgn lupa utk deklarasikan i sbg variable integer. Dimana Self itu adalah parent object yaitu dalam kasus ini adalah TForm. Dan hal ini berlaku umum tdk terbatas utk TEdit aja. > saya juga sudah mencoba membuat sebuah variabel a:tedit; > tetapi bagaimana mereferensikan a tersebut ke componen yang dilooping dalam > i > > sbg ilustrasi di vb (maaf karena saya tahu nya cuma di vb :) ) > dapat dilakukan sbb : > > dim a as textbox > for i=0 to txtFields.count -1 > set a=txtfields(i) > a.text="" > next Ada perbedaan mendasar antara VB & Delphi. VB itu tdk murni OOP sehingga coding spt itu bisa jalan tapi tdk akan jalan di Delphi walaupun ditulis dlm bahasa Delphi. So, it's a good decision moving to Delphi :). Salam, Aris > > Terima Kasih atas jawabannya > > BR, > Ahmad Yadi ------------------------ Yahoo! Groups Sponsor ---------------------~--> Upgrade to 128-Bit SSL Security! http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/i7folB/TM ---------------------------------------------------------------------~-> Berlangganan: [EMAIL PROTECTED] Stop Berlangganan: [EMAIL PROTECTED] Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
