Procedure

CountDlgProps

Module

fTemplateDialog

Last Modified

7/15/2014 3:26:44 PM

Comments

Updates the item and parent item id's with the count

Scope

Local

Local subprogram to

DoTemplateDialog

Declaration

procedure CountDlgProps(var DlgID: string);  //Updates the item and parent item id's with the count

Calls Hierarchy


CountDlgProps
 └IncDlgID

Called-By Hierarchy


                                     CountDlgProps
                                DoTemplateDialog┘ 
                       CheckBoilerplate4Fields┤   
                         DoTemplateDialog...┤ │   
                            ShowTemplateData┘ │   
       TfrmDrawers.mnuPreviewTemplateClick┤   │   
      TfrmDCSumm.popSummMemoPreviewClick┤ │   │   
    TfrmConsults.popNoteMemoPreviewClick┤ │   │   
     TfrmSurgery.popNoteMemoPreviewClick┤ │   │   
       TfrmNotes.popNoteMemoPreviewClick┘ │   │   
          TfrmTemplateEditor.mnuBPTryClick┘   │   
        TfrmTemplateEditor.tvTreeKeyDown┘     │   
                             TTemplate.GetText┘   
                ExecuteTemplateOrBoilerPlate┤     
                      TfrmDrawers.InsertText┤     
           TfrmDrawers.tvTemplatesDblClick┤ │     
            TfrmDrawers.tvTemplatesKeyDown┤ │     
                TfrmDrawers.NewRECDragDrop┤ │     
          TfrmDrawers.SetRichEditControl┘ │ │     
                 TfrmDCSumm.FormCreate┤   │ │     
               TfrmConsults.FormCreate┤   │ │     
                TfrmSurgery.FormCreate┤   │ │     
                  TfrmNotes.FormCreate┘   │ │     
        TfrmDrawers.mnuInsertTemplateClick┘ │     
  TfrmDCSumm.popSummMemoInsTemplateClick┤   │     
TfrmConsults.popNoteMemoInsTemplateClick┤   │     
 TfrmSurgery.popNoteMemoInsTemplateClick┤   │     
   TfrmNotes.popNoteMemoInsTemplateClick┘   │     
      TfrmDrawers.mnuPreviewTemplateClick...┤     
            TfrmDrawers.mnuCopyTemplateClick┤     
         TfrmTemplateEditor.mnuBPTryClick...┘     

Calls

Name Declaration Comments
IncDlgID procedure IncDlgID(var id: string); -

Called-By

Name Declaration Comments
DoTemplateDialog function DoTemplateDialog(SL: TStrings; const CaptionText: string; PreviewMode: boolean = FALSE): boolean; -


Source

171   procedure CountDlgProps(var DlgID: string);  //Updates the item and parent item id's with the count
172   var                                          // value id.0, id.1, id.2, id.3, etc.  The input dialog
173     x: integer;                                // id is in the form 'a;b;c;d', where c is the item id
174     id, pid: string;                           // and d is the parent item id
175   
176   begin
177     id  := piece(DlgID,';',3);
178     pid := piece(DlgID,';',4);
179   
180     if length(pid) > 0 then
181       x := DlgIDCounts.IndexOf(pid)
182     else
183       x := -1;
184   
185     if (x >= 0) then
186       begin
187       DlgInt := TIntStruc(DlgIDCounts.Objects[x]);
188       pid := pid + '.' + InttoStr(DlgInt.x);
189       end;
190   
191     if length(id) > 0 then
192       IncDlgID(id);
193   
194     SetPiece(DlgID,';',3,id);
195     SetPiece(DlgID,';',4,pid);
196   end;