Procedure

TfrmTemplateFieldEditor.cbxObjsNeedData

Module

fTemplateFieldEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public/Published

Owner

TfrmTemplateFieldEditor

Declaration

procedure cbxObjsNeedData(Sender: TObject; const StartFrom: String;
  Direction, InsertAt: Integer);

Calls Hierarchy


TfrmTemplateFieldEditor.cbxObjsNeedData
 ├SubSetOfTemplateFields
 └ConvertCodes2Text
   ├TemplateFieldCode2Field
   └TemplateDateCode2DateType

Calls

Name Declaration Comments
ConvertCodes2Text procedure ConvertCodes2Text(sl: TStrings; Short: boolean); -
SubSetOfTemplateFields function SubSetOfTemplateFields(const StartFrom: string; Direction: Integer): TStrings; -


Source

502   procedure TfrmTemplateFieldEditor.cbxObjsNeedData(Sender: TObject;
503     const StartFrom: String; Direction, InsertAt: Integer);
504   var
505     tmp: TORStringList;
506     i, idx: integer;
507   
508   begin
509     tmp := TORStringList.Create;
510     try
511       FastAssign(SubSetOfTemplateFields(StartFrom, Direction), tmp);
512       for i := 0 to FDeleted.Count-1 do
513       begin
514         idx := tmp.IndexOfPiece(Piece(FDeleted[i],U,1), U, 1);
515         if(idx >= 0) then
516           tmp.delete(idx);
517       end;
518       ConvertCodes2Text(tmp, FALSE);
519       cbxObjs.ForDataUse(tmp);
520     finally
521       tmp.Free;
522     end;
523   end;