Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2002.01.24;
Скачать: [xml.tar.bz2];

Вниз

Добавление элемента в PopUP-меню в run-time.   Найти похожие ветки 

 
Light Elf   (2002-01-06 18:33) [6]

Вот ведь незадача, не получается присвоить.
В хэлпе сказано:

type

TMethod = procedure of object;
TNotifyEvent = procedure(Sender: TObject) of object;

These types represent method pointers. A method pointer is really a pair of pointers; the first stores the address of a method, and the second stores a reference to the object the method belongs to. Given the declarations

type

TNotifyEvent = procedure(Sender: TObject) of object;
TMainForm = class(TForm)
procedure ButtonClick(Sender: TObject);
...
end;
var
MainForm: TMainForm;
OnClick: TNotifyEvent

we could make the following assignment.

OnClick := MainForm.ButtonClick;

Two procedural types are compatible if they have

the same calling convention,
the same return value (or no return value), and
the same number of parameters, with identically typed parameters in corresponding positions. (Parameter names do not matter.)


Если этому последовать, то выскакивает ошибка
Incompatible Types: TNotifyEvent and "procedure, untyped pointer or untyped parameter

Так вот как это все-таки сделать? Понимаю, что просто, но как?




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

Форум: "Основная";
Текущий архив: 2002.01.24;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.44 MB
Время: 0.003 c
6-75635
Dmitry V. Averuanov
2001-11-02 15:42
2002.01.24
Мучительный вопрос:


14-75666
JMK
2001-11-29 06:52
2002.01.24
ЛЮДИ ОТКУДА МОЖНО СКАЧАТЬ DELPHI 6!!!!!!!!!!!!!!!!!!!!!


3-75481
Blind
2001-12-20 10:35
2002.01.24
Не работает многопользовательский режим доступа. Help me


1-75568
NNC
2002-01-06 14:21
2002.01.24
Вопросик!


3-75535
sky3d
2001-12-21 18:24
2002.01.24
SQL запрос





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский