Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


PeterBelow last won the day on November 1 2019

PeterBelow had the most liked content!

Community Reputation

119 Excellent

1 Follower

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

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

  1. PeterBelow

    Split String

    Do it on the string itself, like you learned addition in school. function incrementID(const aID: string):string; var ch: Char; N: Integer; begin Result := aID; N:= Length(Result); while N > 0 do begin ch := Result[N]; case ch of '0'..'8': begin Result[N] := Succ(ch); Break; end; '9': begin Result[N] := '0'; Dec(N); end; '.': Dec(N); else raise Exception.CreateFmt('Invalid character "%s" in ID "%s" at position %d.', [ch, aID, N]); end; {case ch} end; {while} end;
  2. PeterBelow

    Left side cannot be assigned to

    You can change the visibility of properties inherited from an ancestor, you cannot do that with fields. The VCL itself makes heavy use of that.
  3. PeterBelow

    EMonitorLockException help needed

    As far as I can see this function does not wait at all, it just checks the task value and returns. Or does the getter for FTask.Value wait?
  4. Real professionals have to earn money with their works, they don't have the time to reinvent the wheel, debug and validate it. If you want to shoot yourself in the foot be my guest, but don't expect me to supply the bullets...
  5. Attached find a little example program that definitely works . FileEncryption.zip
  6. You don't need to install the component, it is just a convenience wrapper. I'll try to create a small demo over the weekend, no time at the moment.
  7. PeterBelow

    RDP and RD Web deployment of Delphi VCL apps

    Make sure that all modal forms have PopupMode set to pmAuto and in the dpr file you have Application.MainformOnTaskbar := true; That avoids such isssues at least on classic Windows systems. I know nothing about Windows RD Web, though.
  8. I use Lockbox 3 for such purposes.
  9. PeterBelow

    Delphi 11.1: DFM file completely rewritten after update

    See Tools -> Options -> User interface -> Form designer -> High DPI, the designer itself is now DPI aware and you may have to change the default setting if you design on a high DPI monitor.
  10. PeterBelow

    Parallels on MacOS, Designer problems

    Tools -> Options -> User interface -> Form designer -> High DPI
  11. PeterBelow

    Parallels on MacOS, Designer problems

    In Delphi 11 the designer itself can be configured to be DPI-aware. Which version are you using?
  12. PeterBelow

    IDE start randomly stops with error message

    Unlikely, it would be reported much more frequently in this case. I have never seen it, for example, but in my case the only 3rd party package used is MMX...
  13. I think the core of the problem is an ambiguity inherent in the original language syntax inherited from the days of Turbo Pascal and earlier. 'x' can be interpreted either as a character constant or a string constant, and the compiler decides which it should be dependent on the context. A char is also assignment compatible with a variable or parameter of type string (but not vice versa). I see no way to get around this, and changing these rules will never happen since they make sense and changing them would break heaps of older code. Of course the compiler could use more stringent rules for overload resolution, e.g. require type identity and not only assignment compatibility. That would solve the conflict in the case you noticed but would be quite bothersome in other situations, requiring more overloaded versions of a function to be implemented. Think about what a type identity requirement would mean for overloaded functions taking numeric types as parameter. Do you really want to declare versions for byte, smallint, integer, word, cardinal etc. ?
  14. There would probably be a conflict in overload resolution. Anyway, System.StrUtils contains IndexStr and IndexText functions that would serve your need here.