Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


timfrost last won the day on February 24

timfrost had the most liked content!

Community Reputation

34 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I got similar results for loading (6.25ms) and finding (9.06ms) in a ternary search tree. And the StringHash(65536) load time for my list on my machine was 9.4ms. Looking at the StringHash source, the memory usage of both that and TST is the same order of magnitude, but the StringHash makes much more use of strings, of course. The TST meets my needs, and I have no plans to switch, mainly because my function builds in more load helpers and matching features, which fit with how I use it.
  2. I have never liked the idea of a hash, and I use an implementation of a ternary seach tree as a dictionary. I based it on an article in Dr Dobb's Journal in 1998, and it has stood the test of time! I have versions for C and Pascal; the latter for AnsiChar, WidwChar 32-bit and WideChar 64-bit keys. It is incredibly fast and easy to use, and has reasonable memory consumption, unless of course you load a million random 100-byte keys (which takes only a second or so). It has various ways to load and look up keys, and to traverse the set; values can be integer, object or string. I use it it in many different ways, both to match a full key and to find the longest initial partial key. On updating a value, the space used by the old value is not recovered, but that suits most of my uses as a dictionary; and the unit does include a function to rebuild the data store for a dynamic application, if you can spare a second to do so. In its simplest form: tree := tTSTtree.Create; tree.insert(key, value); q := tree.match(key); if (q <> nil) then s := string(pchar(q)); The source is reasonably well commented, and I would be happy let you have a copy, but I have never got around to properly documenting it and uploading it somewhere.
  3. timfrost

    Rio.1 does not save all layout settings

    Yes, problem completely absent in 10.3.3. I have withdrawn my vote for RSP23655 mentioned above.
  4. timfrost

    Sort the Component Palette??

    Yes, there is also a CopiedPaletteItems value in the key (mine is empty) and I think I spotted in Procmon a check for a DeletedPaletteItems value (which I do not have). I agree with your conclusion; the main value (a huge string on my system) is not a pool that I want to paddle in. And that was decided after only looking at the leading characters of the string visible in Procmon. Probably any attempt to reverse engineer it would technically violate the licence, so I am going to stick with the way the palette is now. Over the years I have got used to finding recently installed components near the bottom, and most often the ones I need can be found quite quickly from the substring search. Just close that box and lock it!
  5. timfrost

    Sort the Component Palette??

    I had the same thought, and I could not find them, which was irritating.... So I fired up PROCMON, filtered on bds.exe, and moved Additional down below Win32 in the Palette list, which caused a flurry of registry accesses. You can find the list in a long SZ value, in HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\ToolForm\Mapping\(Default). Over to you; I am not sufficiently motivated to attempt this!
  6. timfrost

    Sort the Component Palette??

    If you have lots of time on your hands you can sort them manually by dragging up and down, in the main window or the pull-down category list!
  7. timfrost

    brcc32 and rc file format...

    It would be helpful if you could say what you propose to use the resource file for. I have dozens of resource files but they may not be relevant for you. What happens if you compile an RC file containing: STRINGTABLE BEGIN 1, "Hello" 2, "World" END
  8. There is loads of stuff which is useful for this type of task at the old EFG graphics library site http://www.efg2.com. The site still exists, but only links to the Wayback Machine now. I needed to find backgrounds of light colours to change to white and of dark to change to black. There is an EFG utility function CountColors which builds a sparse table of the frequrency distribution of each color, which you might find useful, and many others if you need something simpler. Unfortunately I cannot remember which source file I found it in, but I could send you that routine if you cannot find it, Choose a Wayback Machine snapshot a year or so ago (before the site closed) and have a browse. Edit: the function I referred to is in showimage.zip in ImageProcessingPrimitives.pas. You can find the zip from Show Image in the main menu.
  9. timfrost

    DIBControls by Droopy Eyes Software

    @mrpmorris Good to hear from you again in a Delphi context! I don't think I ever used DIBControls, only FastStrings. I find this was 20 years ago now, in 1999.
  10. Without managing the global library path, a package manager would not work for me. I cannot think of any library we use that is not used by multiple Delphi projects; in some cases dozens. So no project search path is ever used or needed. Are you targeting just the type of development shop which builds only one or two huge applications? But don't pay too much attention to this comment, because as I have said before I am very happy using a Finalbuilder project as a DPM.
  11. timfrost

    Closing an external App.

    For FindWindow you need the name of the main window, not the application. Often this would begin with a T, but could be anything you have set it to. Look in the main form source for Tform1=class(Tform) and try 'Tform1' in the FindWindow call.
  12. timfrost

    ShellExecute and passing of password

    An encrypted password on the command line, decrypted by the second app, may not help security very much; if an attacker sees it in the command-line of the second process, they can send the same password later to the second process. Seeding the encryption and decryption with for example the current process ID makes this exploit harder, but not impossible. Everything suggested here has to be interpreted in the light of how secure you actually need all this to be, which we do not know.
  13. timfrost

    SVG Control Package v2.3

    @bverhue Is the support e-mail address on your website correct? I have twice sent you the results of incorrect SVG rendering in your VCL demo (the FMX version gets it right, but we do not use FMX). If you have received the messages, please respond. I can't be bothered to look further at your component if it cannot render our company logo, which is fine everywhere else, and is not going to be fixed.
  14. timfrost

    Form no longer repaints after WM_SETREDRAW

    Have you tried setting caHide in the Action parameter in your FormClose method?
  15. timfrost

    Best components for creating windows service apps

    Yes, I no longer remember when I applied the patches; for each compiler change I just update the compiler defines, build and test. Occasionally I may have had to tweak something.