Leaderboard
Popular Content
Showing content with the highest reputation on 10/11/19 in all areas
-
Add a system-menu item to all applications?
Lars Fosdal replied to PeterPanettone's topic in Windows API
Adulthood is overrated. -
I guess the project wizard needs some work. I'll try and schedule some time but have a pretty full plate right now.
-
Hi Team, D10.3.2. - Where/how do I check/confirm what patches I have or haven't installed into my Delphi? With the several Patches so far, I am uncertain which ones I have actually installed. I see docwiki,emb..... says there is a 'Check for Updates' allegedly in my Program Menu but there isn't. Regards & TIA, Ian
-
Despite its name, UCS4String is not actually a native string type, like (Ansi|Raw|UTF8|Unicode|Wide)String are. It is just a dynamic 'array of UCS4Char', so a null UCS4Char is added to the end of the array to allow for null-terminated-string semantics, ie you can type-cast a UCS4String to PUCS4Char and iterate the string up to the null terminator, just like any other null-terminated P(Ansi|Wide)Char string. UCS4String was introduced way back in Delphi 6 (when UTF8String was first added as just an alias for AnsiString), so it couldn't be added as a true native string type back then. They never made UCS4String into a native string type, even though the RTL is now flexible enough to support a native string with 4-byte characters. All of the necessary plumbing was added in Delphi 2009 when UnicodeString was first introduced and UTF8String was turned into its own unique string type. UCS4String could easily be made into a native string type now, if they really wanted to. They probably haven't done so yet because UCS4String is very seldomly used by anyone, so they likely didn't want to waste development resources on it. Yes, because Length() is simply returning the full array length, which includes the null UCS4Char at the end.
-
I've not ever looked at this function but it's not hard to see what must be going on. There is no 4 byte string type. So you'll be getting a dynamic array back. And there will be a null terminator as there is for all non short string types. But since there is no compiler support for treating the type as a string, you just get the dyn array length function, which counts the null terminator.
-
The readme is a bit out of date, embarcadero did contribute some changes to make it work on mobile and linux.
-
I've just tried my proposal on a Mojave VM, which I updated to Catalina. 1. With old Mojave Mac: Copy and backup ApplicationLoader from the OLD installed XCode package. Right click at XCode and select Show package content 2. Get he AplicationLoader app from here 3. Application loader is an self-containing app 4. Compress the app to ZIP file (this I needed to do, because I had issues to copy the .app onto my server) (Maybe this is again some strange security issue of big A) 5. I could copy the ApplicationLoader locally w/o problems, e.g. to the Macos desktop. 6. Upgrade Mojave and install Catalina (I removed and cleaned up XCode completely, except my copy of ApplicationLoader of coarse),. 7. Now I have Catalina, and I can start ApplicationLoader from old XCode. All seems to work nice and smooth, I didn't made a real upload yet, but I uploaded an old app and got the usual messages, after checking with iTunesConnect. Seems to work fine, probably still OK for a while ( Catalinas lifetime ??).
-
<humour ascerbic="true">This is due to the relationship between "theory" and "practice". In theory there's no difference between theory and practice. In practice, there is. </humour>
-
Interesting article about dying languages
dummzeuch replied to David Schwartz's topic in General Help
As far as I remember these popularity curves are percentages of all programmers, so if the total number of programmers rises and the number of programmers that use <language> stays constant, the popularity curve for <language> falls. -
Detect if running in a remote session..
Anders Melander replied to Ian Branch's topic in General Help
This works for me: function DetectRemoteSession: boolean; const SM_REMOTECONTROL = $2001; // This system metric is used in a Terminal // Services environment. Its value is nonzero // if the current session is remotely // controlled; otherwise, 0. SM_REMOTESESSION = $1000; // This system metric is used in a Terminal // Services environment. If the calling process // is associated with a Terminal Services // client session, the return value is nonzero. // If the calling process is associated with // the Terminal Server console session, the // return value is 0. The console session is // not necessarily the physical console. var Mode: string; begin Result := (GetSystemMetrics(SM_REMOTESESSION) <> 0) or (GetSystemMetrics(SM_REMOTECONTROL) <> 0); // Test for emulated local/remote mode if (FindCmdLineSwitchEx('Session', Mode, ['-','\','/'], True)) then begin if (SameText(Mode, 'Remote')) then Result := True else if (SameText(Mode, 'Local')) then Result := False; end; end; -
Detecting the Remote Desktop Services environment
-
Check what Patches I have installed, or not?
Darian Miller replied to Ian Branch's topic in General Help
As long as you repeat them in the right order, I assume it work out fine as you will end up with all updates. But, it also might be a good opportunity to rebuild from scratch. What I have been considering building is a resource for every hotfix for every version, listed in order. Today it's a mess to try to go back and figure out how to properly install an older version and get all updates. I am waiting until their new EDN portal is released - hopefully they will have that ability built-in. -
Check what Patches I have installed, or not?
Darian Miller replied to Ian Branch's topic in General Help
AFAIK, since some patches are manually installed (files copied to a folder), currently there's no automated way of knowing if you have all the patches installed. Use this list of patches and go through each one to manually verify: https://community.idera.com/developer-tools/b/blog/posts/rad-studio-delphi-and-c-builder-10-3-2-list-of-patches I imagine someone could write a tool to scan your installation and tell you which patch level you are at... -
I would prefer when PPL would be fixed and stabilized instead of not being used at all. There is a couple of functionality in Delphi that relies on PPL and that would need to be reinvented where another external library is used. The lack of manpower dedicated to this part of the RTL (and a lot of others) is a real drawback. I wish Embarcadero would allow more participation from the community or at least all the MVPs that already offered their help in these areas. Another option would be to open source the standard libraries and accept pull requests, but that seems to be only at the edge of their radar - if at all.
-
https://community.idera.com/developer-tools/b/blog/posts/rad-studio-10-3-2-runtime-packages-compatibility-patch-released
-
Anyone else notice performance issues for iOS from 10.3.2 compilations?
Mahdi Safsafi replied to Sherlock's topic in Cross-platform
In addition to what @Stefan Glienke pointed out, there is a problem with your prototypes, your function does not change aQuality param so why you're passing it by value ? Also you're adding extra-no-sense comparison : if aQuality = rsPoor then Result := 0 // you may remove this one ! ... else Result := 0; // rsPoor covered here ! -
Anyone else notice performance issues for iOS from 10.3.2 compilations?
Stefan Glienke replied to Sherlock's topic in Cross-platform
The original code in QualityToInt causes a System.LoadResString for each "case" it checks every time you call that method and System._UStrEqual for the equals check. Neither of those two methods have changed between those versions according to the diff I just did. However LoadResString calls quite a number of other functions that I did not check for changes. I would say a dictionary is pretty much overkill here for those 3 strings - it only is faster because you eliminated the (as I assume) LoadResString calls every time. Try initializing values you compare to only once instead of comparing against the resource strings. I am pretty sure that will beat the dictionary. -
There is another one from Vincent Parrett: https://github.com/VSoftTechnologies/VSoft.CommandLineParser
-
Note that CodeCentral is going to be shutdown soon, see The future of CodeCentral announcement in the Embarcadero community.