TDictionary OnKeyNotify


Anybody here have code example for TDictionary.OnKeyNotify?

After convert code from Delphi I got error for line:

Self.OnKeyNotify := TDictionaryEventsHandler.OnKeyNotify;

Self - TDictionary type
TDictionaryEventsHandler.OnKeyNotify - class procedure

Error: No overloaded method “OnKeyNotify” with 0 parameters on type “TDictionaryEventsHandler”

Plese help me with advise or code example.

Thank you!


I found solution:
Self.OnKeyNotify := @TContactDictionaryEventsHandler.OnKeyNotify;
instead of
Self.OnKeyNotify := TContactDictionaryEventsHandler.OnKeyNotify;

‘@’ resolve my issue.

Thank you.


glad to hear you found this, and my apologies for the delayed reply — unfortunately the colleague most suited to help with this issue was off yesterday :(.

Please don’t hesitate to let me know if you have ay further questions.