Leaderboard
Popular Content
Showing content with the highest reputation on 06/26/20 in Posts
-
Disadvantage of using defined type of TArray?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
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. -
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.
-
Disadvantage of using defined type of TArray?
Stefan Glienke replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
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 -
Advice on debugging Windows Store app while minimising submissions
Eric58 replied to Eric58's topic in General Help
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. -
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
-
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?
-
Possible custom Format types?
Anders Melander replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
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); -
fixed in revsion #3182 on 2020-06-06
-
Possible custom Format types?
Mike Torrettinni replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
OK, makes sense. It looks like very versatile function! -
Possible custom Format types?
Anders Melander replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
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; -
When did Pos become PosEx?
Stefan Glienke replied to Angus Robertson's topic in RTL and Delphi Object Pascal
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} -
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
-
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.
-
And you can see the future ... how, exactly? If nobody reports it, and nobody votes on it, then that is a likely certainty.
-
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).
-
Hi there, Is anyone aware if Andreas is working on an updated version of it's wonderful tool? Thanks Stephane
-
A free license was offered multiple times and is clearly not the limiting aspect here.
-
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!
-
I use pyscripter version. FYI guys, pyscripter is one of the best developers that knows how to correctly maintain/extend 3rd party library.
-
ParnassusCoreEditor.dll AccessViolation
Lars Fosdal replied to bazzer747's topic in Delphi Third-Party
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 -
It's called consistency and is considered to be a good thing...most of the time.
-
Disadvantage of using defined type of TArray?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
You are just polluting the namespace for no benefit. Use TArray<T>. -
Make Messages TOOL WINDOW remain always visible after Build/Compile
PeterPanettone replied to PeterPanettone's topic in Delphi IDE and APIs
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! -
Make Messages TOOL WINDOW remain always visible after Build/Compile
dummzeuch replied to PeterPanettone's topic in Delphi IDE and APIs
GExperts has an option to automatically close it on successful compile. Maybe you have enabled it? (Default is disabled though.) -
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.