Jump to content

FPiette

Members
  • Content Count

    1211
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by FPiette

  1. FPiette

    Several F2084 Internal Error on Delphi 10.4.2

    I never use run time packages. And if you suspect this is your problem, it is easy to suppress the use of run time packages and compile everything in a single executable. OK, executable will be bigger but will not require more memory at run time.
  2. FPiette

    Several F2084 Internal Error on Delphi 10.4.2

    I use D10.4.2 every single days without any problem.
  3. FPiette

    Scanning and printing projects.

    Do you mean something to find all DPR files on your disk? Try this on the command line: DIR /B /S C:\*.DPR To get the list in a text file, proceed like this; DIR /B /S C:\*.DPR >MyTextFile
  4. FPiette

    Delphi books

    What is your actual skills with Delphi? What kind of application do you want to write? Which platforms are you using?
  5. I don't know but it is easy to know: call GetCurrentThreadId (Windows api) from hte main thread and from the callback.
  6. I don't know what you draw on screen, but have you considered off-loading everything to the GPU? Much like a game.
  7. When I use the implementation section rearrange feature, MMX remove empty lines which separate each method. Before rearrangement, my code looks like: {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} // Some Comment procedure TForm1.Method1; begin // Some code end; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} // Some more comment procedure TForm1.Method2; begin // Some code end; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} There are TWO empty lines after the "end;" at the end of each method. After rearrangement, there is only one left. Is there and option to avoid this empty line removal? Thanks.
  8. Use a multimedia timer via the Win32 API timeSetEvent() or CreateTimerQueueTimer() function.
  9. Thanks Uwe. Maybe a future option? Either (best) specify the number of empty lines after the "end;", or to leave the lines as is in the source code.
  10. FPiette

    compiling DCU without creating EXE

    Probably, if you move the code to one or more run time packages, it will be faster. You can use run time package just for development. Then if you like, you can disable it for your release to keep one single executable file.
  11. FPiette

    Issues with Sleep(1) called in a loop

    You should not access the UI from a thread.
  12. Add the folder to the IDE options library path or to the project options library path.
  13. FPiette

    Safe uninstall/reinstall RAD Studio 10.3

    Uninstalling Delphi won't change your install count. If you have only one installation, no problem to do a second. But it is better to keep it when you'll really need it. Your PC doesn't boot anymore on the hard disk? Or do you have some bad sectors but it still works? What is the exact problem? (Don't answer if you are not interested in trying to fix your PC).
  14. FPiette

    Safe uninstall/reinstall RAD Studio 10.3

    What error makes you think you must reformat your machine ? I never ever had to reformat my computer and I use Windows since his beginning. I was always able to repair whatever trouble I had. If you are unsure about repairing, I strongly advice you to create a disk image using - for example - Macrium Reflect. Using that tool, you can also create a bootable media with Macrium so that you can restore your backup on a completely new hard disk. And anyway, you should create a new backup after each important change in your computer.
  15. FPiette

    Safe uninstall/reinstall RAD Studio 10.3

    As far as I know, it is unsafe. The number of installation are very restricted. I suggest that you don't reformat the machine but do a Windows repair instead.
  16. You didn't define the variable types, so I made some guessing and came with the following code: type TDirection = (dirE, dirW, dirN, dirS); TDirections = set of TDirection; var DX : array [TDirection] of Integer = (1, -1, 0, 0); DY : array [TDirection] of Integer = (0, 0, -1, 1); Opposite : array [TDirection] of TDirection = (dirW, dirE, dirS, dirN); procedure Demo; var x, y, nx, ny : Integer; Dir : TDirection; Grid : array[0..100, 0..100] of TDirections; begin x := 3; y := 5; Dir := dirN; nx := x + DX[Dir]; ny := y + DY[Dir]; Grid[nx, ny] := Grid[nx, ny] + [Opposite[Dir]]; end;
  17. @Fr0sT.Brutal given the way he defined N, S, E, W (Power of two), it is likely meant to combine them (NE = N + E). It is better stay like it is, or replaced by an "set of". But of course we don't know how he makes use of those values so it is pure speculation...
  18. FPiette

    community.embarcadero.com's forums

    The external sources where much much more used.
  19. FPiette

    community.embarcadero.com's forums

    They are gone. See https://blogs.embarcadero.com/community/
  20. FPiette

    RADSTUDIO lamp Utllity

    What kind of website? What do you want to do? What do you already know about web technologies? What do you already know about Delphi targeting Linux (The "L" in LAMP)? Did you already used Google to find a starting point?
  21. FPiette

    Retrieve Delphi version used from within an App?

    ICS has an include file which define a specific symbol for each Delphi version from D1 to D10.4. The symbol are named after the highest version number you can find in the IDE about box. For example in D10.4.2, you can read "Embarcadero® Delphi 10.4 Version 27.0.40680.4203" in the about box and DELPHI27 symbol is defined. There are also symbols like DELPHI15_UP for Delphi Version 15.X.Y.Z aka Delphi XE and up. This symbol allow conditional compile for code containing feature introduced in the language at a specific version. There are also similar symbols for C++ Builder and for the compiler itself. Read the file...
  22. FPiette

    Retrieve Delphi version used from within an App?

    To a certain extent, you may use the predefined symbols. See the documentation here and here. Using conditional compilation, you can generate a string with a pretty name for Delphi version.
  23. No constructor in interface. The constructor stay in the class. Base methods such as Work() can be in a base interface and all other interfaces inherit from the base interface.
  24. Since Delphi do not support multiple class inheritance, you should use interfaces. A class can support many interfaces. So TSalesManager can support IHuman, ISales and IManager interfaces. At the class level, you can delegate an interface implementation to another class.
×