Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/02/24 in all areas

  1. You can do it without TValue if TypeInfo(T) = TypeInfo(Integer) then PInteger(@Result)^ := 10 else if TypeInfo(T) = TypeInfo(string) then PString(@Result)^ := 'Hello'
  2. In XE7 and later, you should use the GetTypeKind() intrinsic function instead of using TypeInfo() comparisons: https://delphisorcery.blogspot.com/2014/10/new-language-feature-in-xe7.html case GetTypeKind(T) of tkInteger: PInteger(@Result)^ := 10; tkLString: PAnsiString(@Result)^ := 'Hello'; tkUString: PUnicodeString(@Result)^ := 'Hello'; ... end;
  3. DelphiUdIT

    What's the general opinion on v12?

    Apart from the fact that we are in the section: nothing else.
  4. Remy Lebeau

    Advice for Compiling Github Indy under Delphi 12

    I'm guessing you didn't see https://github.com/IndySockets/Indy/pull/517 yet? In any case, I'm also working on my own update to Indy for D12, but that update also includes bringing Indy's Package Generator up-to-date, which is why I haven't merged the above PR yet, as I want to see how the generated files compare to the PR's files. Although, I guess at this point, I should just merge the PR and then merge in any generator diffs later...
  5. Cristian Peța

    Can't complete installation of RAD 10.4

    Install from ISO.
  6. David Heffernan

    Delphi and "Use only memory safe languages"

    No it's not. Not really the point if a government agency will only accept work using tools that meet certain criterion. You can either follow the specification and have a chance of getting the work. Or argue about the specification and be completely ignored. That's just reality.
  7. Ian Branch

    What new features would you like to see in Delphi 13?

    Case on Strings. i.e. case myStringVariable of 'A': do something; 'Test': do something; etc end;
  8. Vincent Parrett

    What new features would you like to see in Delphi 13?

    Embarcadero would need to move to a multi pass compiler to achieve this - something they have always resisted. I can understand this 10-15 yrs ago, but on modern hardware the compiler performance loss from multiple passes would not be that noticable. Edit : FWIW - in a multipass compiler, forward declarations are not usually needed (Java, C# for example don't use forward declarations).
  9. Fred Ahrens

    What new features would you like to see in Delphi 13?

    I don't need any new features. I just need that the existing features work as intended. And there are many areas where existing features need to be made usable again (e.g. refactoring, code formatting, HighDPI). OK, one new feature would be nice: compiling for Raspberry Pi. But fixing the existing features needs to be done first.
  10. Dmitry Arefiev

    TFDUpdateSQL Problem

    @VLDG, thanks ! Yes, this is the issue in FireDAC support for Firebird 5. The issue is fixed, the changes will be included into Delphi 12 Update 1.
  11. On a side note, you should not be passing an Owner to your thread. You are creating the TPing object inside your worker thread, so don't assign a component from the main thread as its Owner. Set the Owner to nil instead, and then Free() the object when you are done using it.
×