Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.06.29;
Скачать: CL | DM;

Вниз

Процедура   Найти похожие ветки 

 
Кирилл ©   (2005-06-06 10:51) [0]

Подскажите пожалуйста, как присвоить процедуре значение метода?


 
Ozone ©   (2005-06-06 10:53) [1]

Расшифруй чего ты хочешь


 
Плохиш ©   (2005-06-06 10:53) [2]

Переведите на русский, пожалуйста.


 
Digitman ©   (2005-06-06 10:56) [3]

в ран-тайм с назначением обработчиков событий "плаваешь" ?


 
Ega23 ©   (2005-06-06 11:01) [4]


function ShowTexLogFile(const aFileName:String):Boolean;
           procedure BtnClearClick(Sender:TObject);
           var
            i:Integer;
            _memo:TMemo;
           begin
            if (Sender is TForm) then
             begin
              With TForm(Sender) do
               begin
                for i:=0 to ComponentCount-1 do
                 if (Components[i] is TMemo) then
                  if UpperCase(TMemo(Components[i]).Name)=UpperCase("memSQLLogMonitor") then
                   begin
                    _memo:=TMemo(Components[i]);
                    _memo.Lines.Clear;
                    _memo.Lines.Add(" ");
                    _memo.Lines.SaveToFile(_memo.Hint);
                    Break;
                   end;
               end;//With TForm(Sender) do
             end;//if (Sender is TForm) then
           end;//procedure BtnClearClick(
var
aForm:TForm;
aPanel:TPanel;
OnClearClick:TMethod;
List:TStringList;
i:Integer;
begin
Result:=False;
//if not FileExists(aFileName) then Exit;
try
 Application.CreateForm(TForm, aForm);
 try
  With aForm do
   begin
    Caption:=aFileName;
    BorderStyle:=bsSingle;
    Height:=500;
    Width:=750;
    Position:=poScreenCenter;
   end;
  With TMemo.Create(aForm) do
   begin
    Parent:=aForm;
    Name:="memSQLLogMonitor";
    Align:=alClient;
    ScrollBars:=ssBoth;
    //Height:=440;
    Clear;
    Hint:=aFileName;
    List:=TStringList.Create;
    if FileExists(aFileName) then
     begin
      List.LoadFromFile(aFileName);
      for i:=List.Count-1 downto 0 do Lines.Add(List.Strings[i]);
     end;
    List.Free;
   end;
  aPanel:=TPanel.Create(aForm);
  With aPanel do
   begin
    Parent:=aForm;
    Height:=45;
    Align:=alBottom;
   end;
  With TButton.Create(aPanel) do
   begin
    Parent:=aPanel;
    Cancel:=True;
    Height:=25;
    Width:=100;
    Font.Size:=10;
    Top:=10; //aPanel.ClientHeight-10;
    Left:=aPanel.Width-110;
    Anchors:=[akTop, akRight];
    Caption:="Закрыть";
    ModalResult:=mrOK;
   end;
  With TButton.Create(aPanel) do
   begin
    Parent:=aPanel;
    Height:=25;
    Width:=100;
    Font.Size:=10;
    Top:=10; //aPanel.ClientHeight-30;
    Left:=aPanel.Width-220;
    Anchors:=[akTop, akRight];
    Caption:="Очистить";
    OnClearClick.Code:=@BtnClearClick;
    OnClearClick.Data:=aForm;
    OnClick:=TNotifyEvent(OnClearClick);
   end;
  aForm.ShowModal;
 finally
  aForm.Free;
 end;
except on E:Exception do
 raise Exception.Create("ShowTexLogFile "+E.Message);
end;
end;


 
Кирилл ©   (2005-06-06 11:05) [5]

У меня есть

Type
TMyClass= class
 procedure MyMethod;
end;

Var
MyClass: TMyClass;
MyProc: procedure;


Хочу сделать

MyProc:=MyClass.MyMethod;

Но получается ошибка. Пробовал с указателями - тоже ничего не выходит


 
evvcom ©   (2005-06-06 11:07) [6]

Var
 MyProc: procedure of object;


 
Digitman ©   (2005-06-06 11:09) [7]

MyProc: procedure of object;


 
Кирилл ©   (2005-06-06 11:10) [8]


> evvcom ©   (06.06.05 11:07) [6]


Всё работает, большое спасибо!



Страницы: 1 вся ветка

Текущий архив: 2005.06.29;
Скачать: CL | DM;

Наверх




Память: 0.49 MB
Время: 0.031 c
1-1117784861
312Kbps
2005-06-03 11:47
2005.06.29
Работа с файлом txt !!!


3-1116249702
juice
2005-05-16 17:21
2005.06.29
Создатель базы


3-1116215612
Андрей1
2005-05-16 07:53
2005.06.29
Каскадное обновление


14-1117267775
vajo
2005-05-28 12:09
2005.06.29
монтаж сети


1-1118171137
Vulko
2005-06-07 23:05
2005.06.29
Проблема кодировки при idHTTP.Get