Procedure

FreeEntries

Module

uTemplateFields

Last Modified

3/11/2015 8:41:54 AM

Scope

Interfaced

Declaration

procedure FreeEntries(SL: TStrings);

Calls Hierarchy


FreeEntries
 └TTemplateDialogEntry.SetAutoDestroyOnPanelFree
   └PanelDestroy

Called-By Hierarchy


                     FreeEntries
TfrmTemplateDialog.FormDestroy┘ 

Calls

Name Declaration Comments
TTemplateDialogEntry.SetAutoDestroyOnPanelFree procedure SetAutoDestroyOnPanelFree(const Value: boolean); -

Called-By

Name Declaration Comments
TfrmTemplateDialog.FormDestroy procedure FormDestroy(Sender: TObject); -


Source

330   procedure FreeEntries(SL: TStrings);
331   var
332     i, idx, cnt: integer;
333   
334   begin
335     if(assigned(uEntries)) then
336     begin
337       for i := SL.Count-1 downto 0 do
338       begin
339         idx := uEntries.IndexOf(SL[i]);
340         if(idx >= 0) then
341         begin
342           cnt := uEntries.Count;
343           if(assigned(uEntries.Objects[idx])) then
344           begin
345             TTemplateDialogEntry(uEntries.Objects[idx]).AutoDestroyOnPanelFree := FALSE;
346             uEntries.Objects[idx].Free;
347           end;
348           if cnt = uEntries.Count then
349             uEntries.Delete(idx);
350         end;
351       end;
352       if(uEntries.Count = 0) then
353         uInternalFieldIDCount := 0;
354     end;
355   end;