Re: VCL freezes/stops responding
Datum: 08.11.2008 17:22
Message-ID: <xn0fxfpaykmoriq003@news.online.de>
Newsgroup: alt.comp.lang.borland-delphi
Kode Kyk wrote: > I have tried to use a method of an object but with no success. The > compiler wont allow it, allthough it doesn't give any explanation for > it. And why can't it be a method? Because a method has one extra, hidden parameter. Each method, although it is not declared, gets one extra parameter, which represents the instance of the class (it is the value you can access with Self). Normal procedures and functions do not need such a value. Also, a method reference is not just a single pointer. It is in fact a record which contains TWO pointers: one to the code fo the routine, and one to the instance data. That is why you must specifiy MyObj.SomeMethod when assigning to such a type. -- Rudy Velthuis http://rvelthuis.de "A single death is a tragedy, a million deaths is a statistic." -- Joseph Stalin.[ Auf dieses Posting antworten ]
