Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/31/21 in all areas

  1. David Heffernan

    Move a Function or Procedure to a Unit??

    Get Martin Fowler's book on refactoring.
  2. limelect

    stringreplace character in all string

    Try using RxStrUtils in unrxlib function ReplaceStr(const S, Srch, Replace: string): string;
  3. Rollo62

    Move a Function or Procedure to a Unit??

    TLDR; I think you mixed too many stuff in one method. I would separate this into different domains, each in a unit, e.g. like UMailSend.pas, USysInfo.pas, and the caller I usually encapsule separate functions into classes, with static functions/methods. This behaves same like functions or methods, but keep them under a "namespace" of the class, which could be extended if needed. type TMail = class class function Send( AReceiver, AMessage : String, ...); static; end;
  4. David Heffernan

    stringreplace character in all string

    Should be #0 rather than '#0'. Your code is replacing the text '#0' which doesn't appear in the string.
  5. Rollo62

    Simple JSON parsing

    Well, don't worry, that happens from time to time to all of us
  6. corneliusdavid

    Bookmarks dead?

    It never ceases to amaze me how people in these forums can have such deep and intimate knowledge of the code of the IDE and it's plugins and libraries that they feel they have the right to highly criticize the hard-working team behind the complex and powerful development tools we use. As an independent programmer, I can set my own deadlines--and I don't release anything until I'm sure it's ready. When I worked for a large corporation, executives that have to please shareholders are the ones that set deadlines--and whatever code was ready, was released. I'm sure the Delphi team would've loved to postpone the release of D11 until it was more fully tested and all the plugins were finished to be released along with them but I'm also fairly certain they didn't have a choice and are also not allowed to voice those internal issues. Personally, I feel sorry for them and the pressure they must be under, especially when they read these posts and can't do a single thing about it.
  7. Alexander Halser

    Spell Checker implementation?

    Have a look at my NHunspell implementation (mentioned above as https://www.helpandmanual.com/downloads_delphi.html, but it's on SourceForge as well): https://sourceforge.net/projects/nhunspelldelphi/files/ It is a wrapper for NHunspell for Delphi 2007 up to the latest versions. And it includes a wrapper class for Addict v4 dictionaries. Hunspell is great, because it's open source and can use numerous dictionaries from OpenOffice. But Hunspell alone is missing a parser for the classes/controls used by many Delphi developers. Like a TRichview, just to name an example. The Addict spell checker is great, because it is a solid spelling checker with a full-fledged parser, has been around for quite a while and it enjoys support for almost every Delphi control you can think of. Just the dictionaries delivered with Addict were never really good. My goal back then was to combine the two, without having to rewrite everything spelling-check related. We keep using Addict as the spelling checker for everything it was used before. But we don't use the dictionaries. The component comes with an ad3MainDictionary.pas unit (which is, in fact, for Addict 4) and implements a new TMainDictionary (the Addict dictionary class), which redirects the generic functions to Hunspell. The unit needs to replace the original unit from Addict, or take precedence in your search path. The main dicts can be mixed with custom user-defined dictionaries from Addict and the spelling check function is fully transparent. The wrapper has been approved by Addictive Software for inclusion into the open source distribution, because this part of the package is actually not fully open. What it does Implements Hunspell for Delphi 2007 and up. Takes .OXT files as dictionaries, no need to unzip them. A simple zip reader and XML parser is part of the distribution. Supports spelling and hyphenation dictionaries (no Thesaurus) Optionally introduces a TMainDictionary wrapper to use it with the Addict Spelling checker So, if you have been using Addict (you need an Addict license, to use the Addict wrapper) you have the best of both worlds with this implementation. You can use Addict as your spell check engine without many changes, but run it with OpenOffice dictionaries. The hyphenation part is separate from Addict and needs to be applied manually. All the control parsers that were made for Addict, however, should be working fine. I haven't bothered to update the component on SourceForge. It has received a few internal tweaks in last couple of years - mostly strange OXT configurations, that we have come across. If you are going to use it, please PM me for an update.
  8. Vincent Parrett

    Spell Checker implementation?

    I've used the addictive lib for many years, but it's become a problem for me while separating execution from UI code so I can get by app running on docker - the library is so tied up in the vcl that it's not usable from a console app. Sadly, it appears the devexpress and tms ones are also dependent on the vcl (layered api's people!)
×