Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/26/20 in all areas

  1. Distinct types don't give you type safety when used with integers and strings. These distinct types are still assignment compatible. There is a use in type identity for design time property editors. If you want type safety for assignment you'd need to wrap in a record.
  2. Daniel

    Load form icon while using styles

    Mahdi - again: calm down now. This is not the first time I have to tell you to calm down. it is pretty simple: if you feel unable to have a focused discussion on a topic, just don’t do it. You must stop personal attacks against other members. we come from all over the world, many of us are not native English speakers. So, well, yes, we might understand the wording of another member in different ways. Please keep this in mind. But there is a consensus that some(!) of your posts tend to be personal against other members. So, please step down a little. Soon.
  3. Sorry to disappoint you but that does not compile but raises [dcc32 Error] E2574 Instantiated type can not be used for TYPE'd type declaration Too bad we are working with Delphi where it does not matter because I can still assign a TUserName to TUserFirstName
  4. OK, I found the solution of how to associate an app in Rad Studio to the store. The links you posted gave me an idea of what is needed, although it was addressing Visual Studio environment. The solution is to ensure that the manifest file generated for adhoc appx file is identical to the manifest file generated for the store appx. The reason why they are different is due to the different parameter-gathering approach of Rad Studio: 1. When building a Store appx file, Rad Studio prompts for these 4 parameter values that will be eventually substituted into the manifest file. Package Name Package Display Name Publisher Publisher Display Name 2. When building an Adhoc appx, Rad Studio only prompts you to supply the certificate file, whose Subject value will be eventually substituted as the Publisher value in the manifest file. So there are two steps to take if you want the adhoc manifest file to be identical to the store manifest file for the above 4 values: Step 1: Create a new certificate file that has the desired Subject value (ie, Publisher value), and use this new certificate file for adhoc building Step 2: Edit the manifest.template.xml file to change the remaining 3 parameters' values accordingly. With these steps, my problem is solved. Maybe Embarcadero should consider incorporating this as an automated facility within Rad Studio, to save others facing the same problem.
  5. Stefan Glienke

    TFixedCriticalSection

    Print TCriticalSection.InstanceSize and you know if it was fixed or not - spoiler: no, it was not. On Windows that is - on Posix TCriticalSection simply uses System.TMonitor which allocates at least the size of a cache line
  6. A few years back, there was a post about potential cache line conflicts with TCriticalSection https://www.delphitools.info/2011/11/30/fixing-tcriticalsection/ The comments indicate it was fixed for TMonitor, but I wonder if anyone knows if it was fixed for TCriticalSection. Looking at the TCriticalSection code in Delphi Seattle, it is very complex, I guess due to cross platform concerns with records, record helpers and then windows API calls all coming into play. I could not find any code there that seems to move things onto a difference cache line, but I definitely could be missing something. Does anyone have any insight into this?
  7. Anders Melander

    Possible custom Format types?

    Hmm. Looking at that RegEx I just realized that I forgot to handle the asterisk parameter specifier in my own code. To fix replace all three occurrences of: while (Result[n].IsDigit) do Delete(Result, n, 1); with: if (Result[n] = '*') then Delete(Result, n, 1) else while (Result[n].IsDigit) do Delete(Result, n, 1);
  8. dummzeuch

    Strange text effect

    fixed in revsion #3182 on 2020-06-06
  9. Mike Torrettinni

    Possible custom Format types?

    OK, makes sense. It looks like very versatile function!
  10. Anders Melander

    Possible custom Format types?

    You can find a function to strip out format specifiers (among other things), including the index, width and precision stuff, here: https://bitbucket.org/anders_melander/better-translation-manager/src/a9e47ac90e7f80b67176cdb61b72aa34f4a8f165/Source/amLocalization.Normalization.pas#lines-306 The code as-is replaces %... with space to make the result readable. This is the relevant code: Result := Value; // Find first format specifier n := PosEx('%', Result, 1); while (n > 0) and (n < Length(Result)) do begin Inc(n); if (Result[n] = '%') then begin // Escaped % - ignore Delete(Result, n, 1); end else if (IsAnsi(Result[n])) and (AnsiChar(Result[n]) in ['0'..'9', '-', '.', 'd', 'u', 'e', 'f', 'g', 'n', 'm', 'p', 's', 'x']) then begin Result[n-1] := ' '; // Replace %... with space // Remove chars until end of format specifier while (Result[n].IsDigit) do Delete(Result, n, 1); if (Result[n] = ':') then Delete(Result, n, 1); if (Result[n] = '-') then Delete(Result, n, 1); while (Result[n].IsDigit) do Delete(Result, n, 1); if (Result[n] = '.') then Delete(Result, n, 1); while (Result[n].IsDigit) do Delete(Result, n, 1); if (IsAnsi(Result[n])) and (AnsiChar(Result[n]) in ['d', 'u', 'e', 'f', 'g', 'n', 'm', 'p', 's', 'x']) then Delete(Result, n, 1) else begin // Not a format string - undo Result := Value; break; end; end else begin // Not a format string - undo Result := Value; break; end; // Find next format specifier n := PosEx('%', Result, n); end;
  11. Stefan Glienke

    When did Pos become PosEx?

    Delphi XE3 because I have this code in Spring.pas: {$IFNDEF DELPHIXE3_UP} function Pos(const SubStr, Str: UnicodeString; Offset: Integer): Integer; asm jmp PosEx end; {$ENDIF}
  12. Edwin Yip

    SynEdit preferred version?

    This is not the correct process as I understand it, you should: - Fork the repository on github web, so you that have your own repository that you can permission to make changes - Clone your forked repository to your local pc - Change the source code as needed (following the contribution rules, if any) - Commit and push your changes to your forked repository - Make a pull request to the original SynEdit2 repository, and wait for acceptance
  13. Anders Melander

    Load form icon while using styles

    That's pretty easy: RecreateWnd is part of the documented public API. CM_RECREATEWND is undocumented. The VCL core is the implementation of the API so there's no surprise there. No I am not. I said "it seems" so I'm talking about appearances. I have no idea about why you do what you do so I can only guess. Calm down. I'm free to state what I think he means since it seems you misunderstood what he said. There is no conspiracy here and we're not all out to get you. We just disagree with you.
  14. Remy Lebeau

    Load form icon while using styles

    And you can see the future ... how, exactly? If nobody reports it, and nobody votes on it, then that is a likely certainty.
  15. Anders Melander

    Load form icon while using styles

    I think the point is that you are violating the API contract; You are supposed to call the API but instead you are circumventing the API and calling the implementation directly - for no good reason. Sometimes there are good reasons to do so but this isn't one of them so it seems you are doing so just because you can, because you don't know better or because you are stubborn. There are multiple definitions of perverse. In this case I think David meant obstinate in opposing what is right, reasonable, or accepted (from Merriam-Webster).
  16. Stéphane Wierzbicki

    IDE Fixpack Sydney

    Hi there, Is anyone aware if Andreas is working on an updated version of it's wonderful tool? Thanks Stephane
  17. Daniel

    IDE Fixpack Sydney

    A free license was offered multiple times and is clearly not the limiting aspect here.
  18. Remy Lebeau

    IDE Fixpack Sydney

    And that Community Edition of 10.4 doesn't exist yet. I think Embarcadero needs to give him a free license, for all the work he does to fix their issues. And then get him into the betas and make sure he finds broken things so they can fix them BEFORE they release!
  19. Mahdi Safsafi

    SynEdit preferred version?

    I use pyscripter version. FYI guys, pyscripter is one of the best developers that knows how to correctly maintain/extend 3rd party library.
  20. Lars Fosdal

    ParnassusCoreEditor.dll AccessViolation

    10.4 has an update to Bookmarks and Navigator. It creates C:\Program Files (x86)\Common Files\ParnassusShared and places ParnassusBookmarks_XSydney.dll ParnassusCoreEditor_XSydney.dll ParnassusNavigator_XSydney.dll So, to cure the 10.3 ailments, copy from C:\Users\<username>\Documents\Embarcadero\Studio\20.0\CatalogRepository\ to the first mentioned common catalog Bookmarks-1.0\ParnassusBookmarks.dll to ParnassusBookmarks_XRio.dll ParnassusCoreEditor-1.0\ParnassusCoreEditor.dll to ParnassusCoreEditor_XRio.dll Navigator-1.0\ParnassusNavigator.dll to ParnassusNavigator_XRio.dll
  21. Sherlock

    ParnassusCoreEditor.dll AccessViolation

    It's called consistency and is considered to be a good thing...most of the time.
  22. You are just polluting the namespace for no benefit. Use TArray<T>.
  23. Yes, it was the GExperts option which I had enabled in an emotional overreaction for the joy of the new GExperts version. BTW, thanks to Thomas for the new version!
  24. GExperts has an option to automatically close it on successful compile. Maybe you have enabled it? (Default is disabled though.)
  25. dummzeuch

    IDE Fixpack Sydney

    As far as I know, he does not have a current Delphi license any more and needs the community edition of 10.4 before he can even start working on it.
×