Jump to content
Registration disabled at the moment Read more... ×
Ian Branch

TypeInfo Issue..

Recommended Posts

Hi Team,

Delphi 12.2.

I have the following line:

  ShowMessage('State: ' + System.TypeInfo.GetEnumName(TypeInfo(TDataSetState), Ord(APD.State)) + '.  Job # = ' + IntToStr(APD.JobNo));

I tried adding System.TypeInfo to the uses clause but Delphi complains it can't compile it.

The issue I have here with this line of code is that Delphi tells me it expects a '(' but found a ',' after the TypeInfo.

I checked the code at https://docwiki.embarcadero.com/CodeExamples/Athens/en/TypInfoGetEnumName_(Delphi) and I am consistant with it.

Have I missed something or is this a bug?

 

Regards & TIA,

Ian

 

Share this post


Link to post
26 minutes ago, havrlisan said:

You've got a typo: it's not System.TypeInfo, it's System.TypInfo

Doh!  Well, isn't that counter intuitive...

Speaks volumes about how we 'journalise' when we read..

Thank you.  All sorted now.

Regards,

Ian

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×