Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 02/19/22 in all areas

  1. Anders Melander

    A book about Object Pascal Style Guide

    What? No comment on the pointless use of FreeAndNil? Ah. There it was 🙂 which ironically is preceded by this statement: Color me insecure then.
  2. Anders Melander

    A book about Object Pascal Style Guide

    I knew it! https://www.imdb.com/video/vi2049426201
  3. Anders Melander

    DPI Awareness, tForm.CurrentPPI and PixelsPerInch not always identical !!???

    I only started getting CAPTCHAs last month. Before that nothing. Maybe they only have a limited number of them so there's not enough for everyone to get them?... 🤔
  4. David Heffernan

    A book about Object Pascal Style Guide

    Yes there is. I explained what was wrong in my first comment. The try of the try/finally is before the local variable LTextFile is assigned, but it should be immediately after it.
  5. David Heffernan

    A book about Object Pascal Style Guide

    This looks very interesting. After a quick skim of one topic on I note that there's an error on page 89 that is worth addressing. LTextFile is protected by a try/finally but created after the try rather than before the try. In that example I'd also put the try of the try/except immediately after the assignment to Result rather than two lines before it. For what it is worth I'm sure that if you had posted here then quote a few people would have read your book and looked for errors and given feedback. I would happily have done so and would still do so.
  6. note: if you read the file from start to end, Memory mapped files are not faster than reading the file in memory. The memory faults make it slower than a regular single FileRead() call. For huge files on Win32 which won't be able to load in memory, you may use temporary chunks (e.g. 128MB). And if you really load it once and don't want to pollute the OS disk memory cache, consider using the FILE_FLAG_SEQUENTIAL_SCAN flag under Windows. This is what we do with mORMot's FileOpenSequentialRead(). https://devblogs.microsoft.com/oldnewthing/20120120-00/?p=8493
  7. Vandrovnik

    Free vs Paid Version of an app

    Hello, Inno Setup is able to take a file which is out of the setup.exe and install it, so if they can distribute more then just one file, they can put logo.jpg etc. in the same directory (or a subdirectory, as in my example) and install would find it there. [Files] Source: "{src}\Licence\*.*"; DestDir: "{app}\Bin"; Flags: external comparetimestamp; Components: Licence
  8. pyscripter

    Spell Checker implementation?

    There were many options mentioned in this thread, but there was no mention of the most obvious one at least on Windows: the built-in Windows spellchecker available since Windows 8. There many advantages compared to the options discussed here. It is free. Very easy to use. Minimal code to add to your project. No need to distribute dictionaries. If the user wants a given language dictionary they can get it through Windows language settings. It persists words added, ignored and autocorrected. It detects duplicate words. I got the idea from Ian Boyed's answer in this Stackoverflow question, but I could not find a Delphi translation of the Windows Spellcheck API. So I created my own. It is included in the attached zip file, along with a demo program. SpellCheck.zip
  9. Lars Fosdal

    Delphi on Windows 11 on MacBook Pro 16 (2021)

    Moved the post to Cross-platform. Ref. Obstacle 2: It is probably path related. For now, I had to move the Mac out of my office to not be tempted to tinker more on it, but get some actual paid work done. The lure of unfamiliar territory was too powerful to resist when within the reach of my fingers.
×