On Wednesday 01 of February 2012 19:19:11 Alexsander Rosa wrote: > Or even (Self as TForm).Close for that matter.
What if he calls Close from class which isn't TForm ? Form1.Close can be used, but in that case he must take care of Form1 ... anyway it's bad programming tehnique. zeljko > > 2012/2/1 Rich Saunders <[email protected]> > > > On 2/1/12 12:49 PM, Timothy Groves wrote: > > > However, the Form1.Close version did, and that's what I'm using. > > > Thanks! > > > > Tim- > > > > Note that using Self.Close; would be safer and much preferred over > > Form1.Close; when called within a TForm1 class method. > > > > It does not rely on the Form1 instance reference to be present and > > usable.
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
