The default visibility in a class is "published". Moving them to the private section may be valid, but it also may be inappropriate, depending on the intent of who/whatever introduced those methods to the class in the first place.
As a general rule I'd say that the IDE form designer sets a bad precedent in this respect. Visibility should always be made explicit. -----Original Message----- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Ayers, Stephen Sent: Friday, 12 November 2010 10:28 To: delphi@delphi.org.nz Subject: [DUG] defining procedures outside of the private and public sections Hi I have just noticed some code that declares some procedures straight under the class definition line. For example: Type TSomeClass = class(Tobject) Procedure AfterSomething(Sender: TObject) Private Somestring : String; Public SomeOtherString : String. Now I know that the Delphi designer puts all the text boxes, button click events etc in this space on forms, but for a hand written class im not sure why this has been done or what access it automaticity gets assigned(private,public..) Can anyone shed some light on this? I am inclined to just move those procedures into the private section as they won't be used outside of the class. Thanks Steve Ayers Analyst Programmer _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe