Changeset 52 for trunk/UContact.pas
- Timestamp:
- Dec 3, 2021, 8:50:43 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UContact.pas
r46 r52 143 143 SFoundBlockEndWithoutBlockStart = 'Found block end without block start'; 144 144 SFieldIndexNotDefined = 'Field index not defined'; 145 SContactHasNoParent = 'Contact has no parent'; 145 146 SLastName = 'Last Name'; 146 147 SFirstName = 'First Name'; … … 478 479 var 479 480 I: Integer; 480 begin 481 C: Integer; 482 begin 483 C := Count; 481 484 I := 0; 482 485 while (I < Count) and (Items[I].Index <> Index) do Inc(I); … … 502 505 Field: TContactField; 503 506 begin 507 if not Assigned(Parent) then raise Exception.Create(SContactHasNoParent); 504 508 Prop := GetProperty(Index); 505 509 if Assigned(Prop) then begin … … 517 521 I: Integer; 518 522 begin 523 if not Assigned(Parent) then raise Exception.Create(SContactHasNoParent); 519 524 Field := Parent.Fields.GetByIndex(Index); 520 525 if Assigned(Field) then begin … … 542 547 function TContact.GetProperty(Index: TContactFieldIndex): TContactProperty; 543 548 var 544 Prop: TContactProperty;545 549 Field: TContactField; 546 550 begin 551 if not Assigned(Parent) then raise Exception.Create(SContactHasNoParent); 547 552 Field := Parent.Fields.GetByIndex(Index); 548 553 if Assigned(Field) then begin … … 555 560 I: Integer; 556 561 begin 557 Parent := Source.Parent;558 562 while Properties.Count < Source.Properties.Count do 559 563 Properties.Add(TContactProperty.Create); … … 568 572 I: Integer; 569 573 begin 574 if not Assigned(Parent) then raise Exception.Create(SContactHasNoParent); 570 575 Result := False; 571 576 for I := 0 to Parent.Fields.Count - 1 do begin
Note:
See TracChangeset
for help on using the changeset viewer.