Jump to content

pyscripter

Members
  • Content Count

    54
  • Joined

  • Last visited

  • Days Won

    2

pyscripter last won the day on May 28

pyscripter had the most liked content!

Community Reputation

49 Excellent

1 Follower

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo

Recent Profile Visitors

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

  1. Form serialization has been changed to become faster. Maybe the changes introduced bug(s).
  2. pyscripter

    GExperts and Delphi 10.3.2

    I don't get the access violation with GExperts and Delphi 10.3.2. GExperts worked smoothly. But I am using GExperts 1.3.12.66 Experimental.
  3. You can use a class helper to expose a private method of a parent class.
  4. Use the magic with statement: With Self do SomeMethod This works in all version of Delphi including recent ones.
  5. pyscripter

    What's the state of JCL/JVCL?

    Andreas Hausladen. Obones and and a few others have been quite active in maintaining JCL/JVCL. Although, there are no recent releases the recommended installation procedure involves using the GitHub master. See https://github.com/project-jedi/jcl for details. JCL/JVCL support all Delphi versions including the most recent ones. There have been tens of commits fixing warnings and minors bugs over the last few months (https://github.com/project-jedi/jcl/commits/master) There are masses of gems in both JCL and JVCL that are still worth using in production code.
  6. pyscripter

    Blogged : Delphi Package Manager RFC

    @dummzeuch Missing icon file added.
  7. pyscripter

    Blogged : Delphi Package Manager RFC

    A related project, MultiInstaller, is not a package manager, but a good way to install multiple packages, directly from git repositories (e.g. Github), from zip files or from existing folders in one-step. I can start using a new version of Delphi in minutes rather than days. The project is fork of the Silverpoint MultiInstaller.
  8. pyscripter

    Is [weak] available in win32/win64

    Thanks! The statement is from the help file of Delphi Rio. Topic Automatic Reference Counting in Delphi Mobile Compilers the only one you get searching on weak references.
  9. The help file states that "If you use the weak attribute in code compiled by one of the desktop Delphi compilers, the attribute is ignored" but this article by Marco Cantu suggests that it is supported by all platforms since Delphi Berlin. So is it available in win32/win64?
  10. pyscripter

    Delphi Rio and tRegEx.Replace Problem

    Please provide runnable code. What is the expected result? What is the result you get?
  11. pyscripter

    Using dxgettext on Windows 10

    LoadResStringW is not a Windows function. It s a function defined with the gettext unit. The THook is used to direct calls from System.LoadResString to gettext's LoadResStringW. It also redirects a bunch of other functions related to resource strings. Say for example this is your program: resourcestring Test = 'Hello" ... ShowMessage(Test); Your program will show the translation of Test, if it exists in the translated messages for the current language and if not it will show 'Hello'.
  12. pyscripter

    Using dxgettext on Windows 10

    {$ifdef UNICODE} HookLoadResString:=THook.Create (@system.LoadResString, @LoadResStringW); {$else} HookLoadResString:=THook.Create (@system.LoadResString, @LoadResStringA); {$endif} The system functions are replaced with gettext versions that return translated strings. So wherever you use resource strings translated values will appear.
  13. pyscripter

    Using dxgettext on Windows 10

    Automatic translation of resource strings.
  14. The code: var C: AnsiChar := #$0A; if C in [#$A, #$D] then Generates the following assembly code in 32 bits. Project2.dpr.26: var C: AnsiChar := #$0A; 004F9C10 C645FF0A mov byte ptr [ebp-$01],$0a Project2.dpr.41: if C in [#$A, #$D] then 004F9C14 8A45FF mov al,[ebp-$01] 004F9C17 2C0A sub al,$0a 004F9C19 7404 jz $004f9c1f 004F9C1B 2C03 sub al,$03 004F9C1D 751C jnz $004f9c3b On the other hand var C: Char := #$0A0A; if C in [#$A, #$D] then generates the following: Project2.dpr.26: var C: Char := #$0A0A; 004F9C10 66C745FE0A0A mov word ptr [ebp-$02],$0a0a Project2.dpr.41: if C in [#$A, #$D] then 004F9C16 668B45FE mov ax,[ebp-$02] 004F9C1A 6683E80A sub ax,$0a 004F9C1E 7406 jz $004f9c26 004F9C20 6683E803 sub ax,$03 004F9C24 751C jnz $004f9c42 Notice that it handles the wide char correctly. However the compiler issues the following warning: [dcc32 Warning] Project2.dpr(41): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit. Question 1: Why the warning is issued, given that the generated code does not reduce the wide char to a byte? Question 2: Doesn't this mean that RSP-13141 has been resolved except for the warning? In the discussion of that issue @Arnaud Bouchez points out that the warning is misleading. In 64 bit the generated code looks much more complex: Project2.dpr.26: var C: Char := #$0A0A; 00000000005716E8 66C7452E0A0A mov word ptr [rbp+$2e],$0a0a Project2.dpr.41: if C in [#$A, #$D] then 00000000005716EE 480FB7452E movzx rax,word ptr [rbp+$2e] 00000000005716F3 6683E808 sub ax,$08 00000000005716F7 6683F807 cmp ax,$07 00000000005716FB 7718 jnbe TestCharInSet + $35 00000000005716FD B201 mov dl,$01 00000000005716FF 8BC8 mov ecx,eax 0000000000571701 80E17F and cl,$7f 0000000000571704 D3E2 shl edx,cl 0000000000571706 480FB60556000000 movzx rax,byte ptr [rel $00000056] 000000000057170E 84C2 test dl,al 0000000000571710 0F95C0 setnz al 0000000000571713 EB02 jmp TestCharInSet + $37 0000000000571715 33C0 xor eax,eax 0000000000571717 84C0 test al,al 0000000000571719 7422 jz TestCharInSet + $5D Question 3: Why is the code is so more complex in 64 bits? Please forgive my ignorance.
  15. pyscripter

    ThemesEnabled deprecated..

    @Uwe Great guess work.
×