You've already forked lazarus-ccr
tvplanit: Fix exception raised when demo program ends (by using up-to-date access to TList).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4688 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1227,8 +1227,10 @@ procedure TVpControlLink.ReleaseDependents;
|
|||||||
var
|
var
|
||||||
I : Integer;
|
I : Integer;
|
||||||
begin
|
begin
|
||||||
for I := 0 to pred(DependentList.Count) do
|
for I := pred(DependentList.Count) downto 0 do
|
||||||
Detach(TVpDependentInfo(DependentList.List^[I]).Component);
|
Detach(TVpDependentInfo(DependentList[i]).Component);
|
||||||
|
// for I := 0 to pred(DependentList.Count) do
|
||||||
|
// Detach(TVpDependentInfo(DependentList.List^[I]).Component);
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
@ -1238,9 +1240,11 @@ var
|
|||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
for I := 0 to pred(DependentList.Count) do
|
for I := 0 to pred(DependentList.Count) do
|
||||||
if TVpDependentInfo(DependentList.List^[I]).Component = Sender then
|
// if TVpDependentInfo(DependentList.List^[I]).Component = Sender then
|
||||||
|
if TVpDependentInfo(DependentList[I]).Component = Sender then
|
||||||
begin
|
begin
|
||||||
TVpDependentInfo(DependentList.List^[I]).Free;
|
// TVpDependentInfo(DependentList.List^[I]).Free;
|
||||||
|
TVpDependentInfo(DependentList[I]).Free;
|
||||||
DependentList.Delete(I);
|
DependentList.Delete(I);
|
||||||
if Sender is TVpLinkableControl then
|
if Sender is TVpLinkableControl then
|
||||||
TVpLinkableControl(Sender).ControlLink := nil;
|
TVpLinkableControl(Sender).ControlLink := nil;
|
||||||
@ -1260,7 +1264,8 @@ var
|
|||||||
begin
|
begin
|
||||||
Exists := false;
|
Exists := false;
|
||||||
for I := 0 to pred(DependentList.Count) do
|
for I := 0 to pred(DependentList.Count) do
|
||||||
if TVpDependentInfo(DependentList.List^[I]).Component = Sender then begin
|
// if TVpDependentInfo(DependentList.List^[I]).Component = Sender then begin
|
||||||
|
if TVpDependentInfo(DependentList[I]).Component = Sender then begin
|
||||||
Exists := true;
|
Exists := true;
|
||||||
Break;
|
Break;
|
||||||
end;
|
end;
|
||||||
@ -1293,7 +1298,8 @@ var
|
|||||||
I : Integer;
|
I : Integer;
|
||||||
begin
|
begin
|
||||||
for I := 0 to pred(DependentList.Count) do begin
|
for I := 0 to pred(DependentList.Count) do begin
|
||||||
with TVpDependentInfo(DependentList.List^[I]) do begin
|
// with TVpDependentInfo(DependentList.List^[I]) do begin
|
||||||
|
with TVpDependentInfo(DependentList[I]) do begin
|
||||||
if Component <> Sender then
|
if Component <> Sender then
|
||||||
EventHandler(Sender, NotificationType, Value);
|
EventHandler(Sender, NotificationType, Value);
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user