Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/05/18 in all areas

  1. dummzeuch

    Detailed logging (for debugging)

    But you could use assert to mask out the logging: function MyLogging(const _Text: string): boolean; begin doLogging(_Text); Result := true; end; Assert(MyLogging('My very important log message')); This would remove all calls to the logging function when you disable assertions.
  2. acj1971

    DelphiAWSSDK v0.3.0

    DelphiAWSSDK v0.3.0 Delphi AWS SDK has new support for Lazarus / fpc 1.8 or higher https://github.com/novuslogic/DelphiAWSSDK/releases/tag/v0.3.0 Summary of updates * New Lazarus CreateTable1 DynamoDB Sample * Refactored Core for Lazarus / fpc 1.8 or higher * Moved Samples Samples\DynamoDB to Samples\DynamoDB\Delphi
  3. This is why we need a forum that is not StackOverflow: Is there a plugin for delphi IDE for doing the following: Jumping from interface to implementing classes. for example in JIdea Java IDE you can easily point to an interface and see all implementing classes and select to which class you want to jump. It is currently very annoying that Ctrl+Click on a method goes to the interface where the method is declared and there is no easy way to find classes implementing this method. The only option I know is search. Voted down and probably will be closed shortly because: "Recommendation requests are off topic here" https://stackoverflow.com/questions/53116163/is-there-a-way-to-jump-to-implementing-classes-in-delphi-rad-studio Maybe somebody here can help? (Note: It's not my question, I just copied it here.)
  4. Juan C.Cilleruelo

    How to know that a file is not used by another program?

    Each error waits one second. I think is absurd repeat without allow the other process finish.
  5. Juan C.Cilleruelo

    How to know that a file is not used by another program?

    This is my current code. I think now is working well. Any idea! Thanks to all. ...... CountErrors := 0; while not (TFile.Exists(PNG_FileName) or (CountErrors > 5)) do begin Inc(CountErrors); Sleep(1000); end; Sleep(1000); CountErrors := 0; SuccessLoad := False; while (not SuccessLoad) or (CountErrors > 10) do begin try BlobField.LoadFromFile(PNG_FileName); SuccessLoad := True; except on EFOpenError do begin SuccessLoad := False; Inc(CountErrors); Sleep(1000); end; end; end; .....
  6. Zacherl

    How to know that a file is not used by another program?

    I remember a that that discussed a similar topic .. it was something like "How to detect, if I can append data to a file". The solution was: Try it and catch errors. There are just too many variables that you would have to check (file exists, access privileges, exclusive access, ...). If you need cross-platform, I can just quote myself: There are other approaches, if cross-platform support is not needed, but none of them are easy (on Windows you could enumerate all open handles to the file e.g. or work with global `CloseHandle` hooks).
  7. Zacherl

    How to know that a file is not used by another program?

    Just trying to open the file is already the correct solution IMHO. You should catch the exception and retry until it works.
  8. Markus Kinzler

    Detailed logging (for debugging)

    Have a look at this tool: https://github.com/grijjy/GrijjyCloudLogger
  9. Ugochukwu Mmaduekwe

    QRCodeGenLib4Pascal

    I know most of you are already aware of this but I just wanted to indicate that I recently just added *experimental* FMX Support and if everything goes well, I plan to merge it to the official repository. I will appreciate it if you all can help me test support in other supported Firemonkey platforms, I have just been able to test on only the Windows Platform and it seems to work fine. FMX Branch can be found here Instructions on how to Compile the Library for FMX can be found in the FMX Branch README. Thanks.
  10. The correct declaration would be: type TPerson = class Name: string; function ToString(Quote: boolean): string; reintroduce; overload; end;
  11. @pyscripter Thank you for the finds! I had some free time, so I adapted Teo's parser for Delphi. Also corrected some bugs in this parser and in the grammar for the Delphi 7.0 language. https://github.com/Kryuski/GOLD-Parsing-System-For-Delphi @Markus Kinzler Interesting. I will definitely follow this project. Update: Parse::Easy is written using Perl. Yes, it can generate a lexer and a parser in Delphi laguage, but hey! I do not want to install another IDE and learn a new language when such things may well be written in Delphi. Once they wrote ErrorInsight on J#, and I think it was a bad decision. Maybe later, I or someone else can rewrite Parse::Easy to Delphi. But now it does not make sense, since it is still in the beta stage.
  12. Look at https://gitlab.com/teo-tsirpanis/gold-parser-Lazarus for a version 5 compatible Gold engine. Version 5 grammars are not compatible with versions 1 engines. But IMHO the good old lex/yacc https://github.com/RomanYankovsky/ndyacclex can be more easily integrated with your Delphi projects. No need to rely on third party libraries. One could develop and test the grammar with GOLD I suppose and then translate it to lex/yacc.
  13. This is something I'm also really missing.
  14. @Tommi Prami That's easy: https://github.com/RomanYankovsky/DelphiAST You might want to try the version with all my patches in it: https://github.com/JBontes/DelphiAST It seems Roman Yankovsky has not had time to integrate all my issues yet. It **is** a very mature library and using it will serve you well. If you want to change the code, grokking the calls between the different parser levels does take some getting used to. I suggest first reading up on the difference between a parser and a lexer if you want to do that. PS don't be put off by the XML output, that's just a cheap trick to display the contents of the tree. You don't need it to work with DelphiAST.
  15. Vince Bartlett

    How to know that a file is not used by another program?

    Try opening the file with an exclusive lock? I'd imagine that would work under Windows at least.
×