I'd be more worried about the lack of try..finally to be honest. Although he should really break it up a little, while I'm not one to jump on procedure/unit length, debugging that would be a PITA if something failed.
It's simple to break it up, just create each component separately: CreateLabels([params]); CreateImage([params]); CreateButtons([params]); And the use of with, we just won't go there <g> JED -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 1 June 2004 9:56 AM To: [EMAIL PROTECTED] Subject: RE: Re[2]: [DUG] Weird Delphi Warning Dunno Al, sorry, With all due respect, this is a bit long for a single method... ;-) Cheers, C. -----Original Message----- From: Alistair Grant George [mailto:[EMAIL PROTECTED] Hello Conor, CBsc> test. Care to post the whole function, Al? Using D5: function EditBox(Prompt, Caption, Default, PassChar, CheckBox, Sound: string; Pic: Tpicture; BoxColor, EditColor: Tcolor; Position: Tposition; StayOnTop: Boolean; EditFont, CheckBoxFont: Tfont; EditWidth: Integer): string; var form: Tform; ww, Ttop, i: Integer; p: array[0..255] of char; hList, el, dl, cb: TstringList; begin Result := ''; //without this no warning if (Prompt = '') and (CheckBox = '') then exit; hList := TstringList.Create; el := TstringList.Create; dl := TstringList.Create; cb := TstringList.Create; Ttop := 1; if Prompt <> '' then [snip] _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
