Someone else could probably explain this better but here is the readers digest version....
TMemo is a descendent of TWinControl therefore it needs an owner which has a Windows Handle. I.E if the TMemo didn't have an owner, windows wouldn't know to refresh the TMemo on your form when the form is repainted etc. so, tempStr := TMemo.Create( TMainForm) ; ----- Original Message ----- From: Alistair George <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Sent: Friday, November 01, 2002 9:06 AM Subject: [DUG]: Control has no owner > A moot case now as I found another solution but could it be clarified why the > below is not right and what would be right: > > > procedure TMainform.VETclearchecks; > var tempstr: tmemo; > begin > tempstr := tmemo.Create(self); file://I'm not doing this right here > tempstr.Clear; > VET.BeginUpdate; > try > VET.Storage.CheckedFileNames := tempstr.Lines; > VET.RefreshTree; > finally > VET.EndUpdate; > tempstr.Free; > end; > end; > > AND > > procedure TMainform.VETclearchecks; > var tstring:tstrings; > begin > tstring:=tstringlist.Create; > VET.BeginUpdate; > try > VET.Storage.CheckedFileNames := tstring; > VET.RefreshTree; > finally > VET.EndUpdate; > end; > tstring.Free; > end; > > -------------------------------------------------------------------------- - > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/