Maybe I am guessing wrong but wouldn't it save hassles if you just did
something more like this:

procedure TMainform.VETclearchecks;
begin
  VET.BeginUpdate;
  try
    VET.Storage.CheckedFileNames.Clear;
    VET.RefreshTree;
  finally
    VET.EndUpdate;
  end;
end;

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:owner-delphi@;delphi.org.nz] On
Behalf Of Alistair George
Sent: Friday, 1 November 2002 9:07 a.m.
To: Multiple recipients of list delphi
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);      //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/

Reply via email to