Changeset 52 for trunk/UContact.pas


Ignore:
Timestamp:
Dec 3, 2021, 8:50:43 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Wrong object reference to contact Parent after Merge files action.
  • Modified: Optimized select all action.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UContact.pas

    r46 r52  
    143143  SFoundBlockEndWithoutBlockStart = 'Found block end without block start';
    144144  SFieldIndexNotDefined = 'Field index not defined';
     145  SContactHasNoParent = 'Contact has no parent';
    145146  SLastName = 'Last Name';
    146147  SFirstName = 'First Name';
     
    478479var
    479480  I: Integer;
    480 begin
     481  C: Integer;
     482begin
     483  C := Count;
    481484  I := 0;
    482485  while (I < Count) and (Items[I].Index <> Index) do Inc(I);
     
    502505  Field: TContactField;
    503506begin
     507  if not Assigned(Parent) then raise Exception.Create(SContactHasNoParent);
    504508  Prop := GetProperty(Index);
    505509  if Assigned(Prop) then begin
     
    517521  I: Integer;
    518522begin
     523  if not Assigned(Parent) then raise Exception.Create(SContactHasNoParent);
    519524  Field := Parent.Fields.GetByIndex(Index);
    520525  if Assigned(Field) then begin
     
    542547function TContact.GetProperty(Index: TContactFieldIndex): TContactProperty;
    543548var
    544   Prop: TContactProperty;
    545549  Field: TContactField;
    546550begin
     551  if not Assigned(Parent) then raise Exception.Create(SContactHasNoParent);
    547552  Field := Parent.Fields.GetByIndex(Index);
    548553  if Assigned(Field) then begin
     
    555560  I: Integer;
    556561begin
    557   Parent := Source.Parent;
    558562  while Properties.Count < Source.Properties.Count do
    559563    Properties.Add(TContactProperty.Create);
     
    568572  I: Integer;
    569573begin
     574  if not Assigned(Parent) then raise Exception.Create(SContactHasNoParent);
    570575  Result := False;
    571576  for I := 0 to Parent.Fields.Count - 1 do begin
Note: See TracChangeset for help on using the changeset viewer.