emileverh 27 Posted Friday at 11:06 AM Hi guys! I want to use in Delphi 13 the NameOf() function to get the current function name ( "UploadCardParseResult" in example below). Is that possible?! procedure TdtmPeppolInvoices.UploadCardParseResult(const AJsonString: string; const AHxr: THXR); begin ShowMessage( NameOf(????) ); Share this post Link to post
Anders Melander 2121 Posted Friday at 11:47 AM 37 minutes ago, emileverh said: I want to use in Delphi 13 the NameOf() function to get the current function name That's not what NameOf does: https://docwiki.embarcadero.com/RADStudio/Florence/en/What's_New#NameOf_Instrict_Function In short, there's no function to get the current function name. You can search these fora for various hacks, and I'm sure someone will post suggestions, but I wouldn't recommend any of them. Share this post Link to post
Kazantsev Alexey 28 Posted Friday at 12:19 PM 1 hour ago, emileverh said: I want to use in Delphi 13 the NameOf() function to get the current function name ( "UploadCardParseResult" in example below). Is that possible?! procedure TdtmPeppolInvoices.UploadCardParseResult(const AJsonString: string; const AHxr: THXR); begin ShowMessage( NameOf(TdtmPeppolInvoices.UploadCardParseResult) ); Share this post Link to post
Uwe Raabe 2208 Posted Friday at 01:07 PM With the introduction of NameOf there are still gaps where it doesn't work (partly huge ones). I guess we can expect extensions to NameOf targets in future updates and releases. Share this post Link to post