Показать сообщение отдельно
  #7  
Старый 18.12.2009, 17:15
Аватар для Енот
Енот Енот вне форума
Прохожий
 
Регистрация: 17.12.2009
Сообщения: 28
Репутация: 10
По умолчанию

Вот такой код касательно WorldObjects:
Код:
WorldObjects = class
 private
   procedure SetCount(Value: Integer);
   function GetCount: Integer;
 public
  list:array of Obj;
 property Count: Integer read GetCount write SetCount;
 procedure AddDot(x,y,z:integer);
 procedure AddLine(stp,enp:coords);
 constructor create;
end;

implementation

constructor WorldObjects.Create;
begin
 SetLength(List,0);
 Count := 0;
end;

procedure WorldObjects.SetCount(Value: Integer);
begin
 SetLength(List, Value);
end;

function WorldObjects.GetCount: Integer;
begin
 Result := Length(List);
end;

...


procedure WorldObjects.AddLine(stp,enp:coords);
begin
  list[count].name:=2;
  list[count].lin.stp:=stp;
  list[count].lin.enp:=enp;
  Count:=count+1;      //<-Даю порядковый номер след. обьекта
  SetLength(List, 1)  // <-Даю место для следующего обьекта
end;

Ну что же у меня не так?
Ответить с цитированием