Function

TTemplateField.CanModify

Module

uTemplateFields

Last Modified

3/11/2015 8:41:54 AM

Visibility

Public

Owner

TTemplateField

Declaration

function CanModify: boolean;

Calls Hierarchy


TTemplateField.CanModify
 └LockTemplateField

Called-By Hierarchy


                     TTemplateField.CanModify
              TTemplateField.SetEditDefault┤ 
 TfrmTemplateFieldEditor.edtDefaultChange┤ │ 
  TfrmTemplateFieldEditor.edtDefNumChange┘ │ 
                  TTemplateField.SetFldName┤ 
    TfrmTemplateFieldEditor.edtNameChange┘ │ 
                  TTemplateField.SetFldType┤ 
    TfrmTemplateFieldEditor.cbxTypeChange┘ │ 
                 TTemplateField.SetInactive┤ 
    TfrmTemplateFieldEditor.cbActiveClick┘ │ 
              TTemplateField.SetItemDefault┤ 
 TfrmTemplateFieldEditor.cbxDefaultChange┘ │ 
                    TTemplateField.SetItems┤ 
    TfrmTemplateFieldEditor.reItemsChange┘ │ 
                   TTemplateField.SetLMText┤ 
  TfrmTemplateFieldEditor.edtLMTextChange┘ │ 
                   TTemplateField.SetMaxLen┤ 
     TfrmTemplateFieldEditor.edtLenChange┘ │ 
                    TTemplateField.SetNotes┤ 
    TfrmTemplateFieldEditor.reNotesChange┘ │ 
                 TTemplateField.SetRequired┤ 
  TfrmTemplateFieldEditor.cbRequiredClick┘ │ 
                 TTemplateField.SetSepLines┤ 
  TfrmTemplateFieldEditor.cbSepLinesClick┤ │ 
   TfrmTemplateFieldEditor.cbExcludeClick┘ │ 
                TTemplateField.SetIncrement┤ 
     TfrmTemplateFieldEditor.edtIncChange┘ │ 
                   TTemplateField.SetIndent┤ 
  TfrmTemplateFieldEditor.edtIndentChange┘ │ 
                   TTemplateField.SetMaxVal┤ 
  TfrmTemplateFieldEditor.edtMaxValChange┘ │ 
                   TTemplateField.SetMinVal┤ 
  TfrmTemplateFieldEditor.edtMinValChange┘ │ 
                      TTemplateField.SetPad┤ 
     TfrmTemplateFieldEditor.edtPadChange┘ │ 
                  TTemplateField.SetTextLen┤ 
 TfrmTemplateFieldEditor.edtTextLenChange┘ │ 
                      TTemplateField.SetURL┤ 
     TfrmTemplateFieldEditor.edtURLChange┘ │ 
                 TTemplateField.SetDateType┤ 
TfrmTemplateFieldEditor.cbxDateTypeChange┘ │ 
     TfrmTemplateFieldEditor.mnuDeleteClick┤ 
   TfrmTemplateFieldEditor.cbxObjsKeyDown┘ │ 
      TfrmTemplateFieldEditor.reNotesChange┘ 

Calls

Name Declaration Comments
LockTemplateField function LockTemplateField(const ID: string): boolean; -

Called-By

Name Declaration Comments
TfrmTemplateFieldEditor.mnuDeleteClick procedure mnuDeleteClick(Sender: TObject); -
TfrmTemplateFieldEditor.reNotesChange procedure reNotesChange(Sender: TObject); -
TTemplateField.SetDateType procedure SetDateType(const Value: TTmplFldDateType); -
TTemplateField.SetEditDefault procedure SetEditDefault(const Value: string); -
TTemplateField.SetFldName procedure SetFldName(const Value: string); -
TTemplateField.SetFldType procedure SetFldType(const Value: TTemplateFieldType); -
TTemplateField.SetInactive procedure SetInactive(const Value: boolean); -
TTemplateField.SetIncrement procedure SetIncrement(const Value: integer); -
TTemplateField.SetIndent procedure SetIndent(const Value: integer); -
TTemplateField.SetItemDefault procedure SetItemDefault(const Value: string); -
TTemplateField.SetItems procedure SetItems(const Value: string); -
TTemplateField.SetLMText procedure SetLMText(const Value: string); -
TTemplateField.SetMaxLen procedure SetMaxLen(const Value: integer); -
TTemplateField.SetMaxVal procedure SetMaxVal(const Value: integer); -
TTemplateField.SetMinVal procedure SetMinVal(const Value: integer); -
TTemplateField.SetNotes procedure SetNotes(const Value: string); -
TTemplateField.SetPad procedure SetPad(const Value: integer); -
TTemplateField.SetRequired procedure SetRequired(const Value: boolean); -
TTemplateField.SetSepLines procedure SetSepLines(const Value: boolean); -
TTemplateField.SetTextLen procedure SetTextLen(const Value: integer); -
TTemplateField.SetURL procedure SetURL(const Value: string); -


Source

1368  function TTemplateField.CanModify: boolean;
1369  begin
1370    if((not FModified) and (not FLocked) and (StrToIntDef(FID,0) > 0)) then
1371    begin
1372      FLocked := LockTemplateField(FID);
1373      Result := FLocked;
1374      if(not FLocked) then
1375        ShowMsg('Template Field ' + FFldName + ' is currently being edited by another user.');
1376    end
1377    else
1378      Result := TRUE;
1379    if(Result) then FModified := TRUE;
1380  end;