-
Content Count
1313 -
Joined
-
Last visited
-
Days Won
28
Sherlock last won the day on September 11 2024
Sherlock had the most liked content!
Community Reputation
688 ExcellentAbout Sherlock
- Birthday 02/25/1970
Technical Information
-
Delphi-Version
Delphi 11 Alexandria
Recent Profile Visitors
-
Delphi Migration Pitfalls and How to Avoid Them
Sherlock replied to Serge Pilko's topic in Tips / Blogs / Tutorials / Videos
🎵Those where the days, my friend, we thought they'd never end....🎶 -
Same here. Perhaps this nuisance is over.
-
Removing semi transparency in background compile window
Sherlock replied to Roger Cigol's topic in General Help
OMG! When will self declared usability engineers finally learn, that transparency looks only good on screen (as in movies and TVs) not in everyday use. I'm still trying to figure out where the first transparent whiteboard (sic!) was shown. I believe it was in the classic CSI or perhaps the film "Minority Report". Ugh! -
That is just the usual gap between "we'll do that later" and "rather implement nifty cool feature". Murphy's addendum: If something has not been done right for the first release, it will never get done.
-
New Delphi features in Delphi 13
Sherlock replied to David Heffernan's topic in RTL and Delphi Object Pascal
@HeartWare Oh no! It's the end of the world as we know it... What can we do? In other words: If nothing else is wrong with that site, they did a decent job. -
New Delphi features in Delphi 13
Sherlock replied to David Heffernan's topic in RTL and Delphi Object Pascal
THIS! -
Ugh, AIs looking for brains..... the zombie apocalypse is upon us!
-
RAD Studio 13 project build speed is slower
Sherlock replied to Chau Chee Yang's topic in Delphi IDE and APIs
How often are these resources subject to change? It would be unusual for them to change for every build, and the solution provided by @Vincent Parrett is common practice with SCM and automated builds. If however they do change often, a batch could be run as a pre build script. -
Working with AI for the first time
Sherlock replied to Alberto Paganini's topic in Tips / Blogs / Tutorials / Videos
Surprisingly (or not) that is sound advice. But nowadays Google increasingly delivers an AI generated answer, which gives a good start (as in beginning not scare). I googled "tutorial on how to use ai for programming" and got an OK answer from their AI. -
It is just an assumption on my part. I just checked with some searches, and it seems that there is more to bookmarks and how the IDE handles them than I thought. And they should be preserved through automated code formatting when used inside the IDE. The will break or get lost though, if a pas file is formatted outside the IDE.
-
That seems to be a hard requirement to fulfill, seeing as bookmarks (IIRC) are tied to line numbers and line numbers may change after formatting.
-
New Delphi features in Delphi 13
Sherlock replied to David Heffernan's topic in RTL and Delphi Object Pascal
That is a marketing vehicle they choose to ride every other year "Limited offer for a limited time only! Upgrade from any Delphi Version" -
@Die Holländer That would be my ultimate goal. But this time I actually wanted to "grow" a project with the machine.
-
My last excursion to Google Gemini was successful at the end, but kinda bumpy still. I started out by asking Which gave me three possibilities ask the user for the key, use hardware keys or DPAPI. It also explained (quite lengthy) what the pros and cons of each solution are. I was kinda looking for DPAPI anyway so I went for that with That resulted in naming the API calls CryptProtectData and CryptUnptotectData stating they should be declared in Winapi.CryptDPAPI.pas or more general in Winapi.Windows.pas. The main advantage being the lack of a password entirely, everything being managed by Windows itself. It then presented me with some example code unit MyDPAPIUnit; interface uses Winapi.Windows, Winapi.CryptDPAPI, System.SysUtils; function ProtectData(const AData: TBytes; const ADescription: string = ''; AForLocalMachine: Boolean = False): TBytes; function UnprotectData(const AData: TBytes; var ADescription: string; AForLocalMachine: Boolean = False): TBytes; implementation function ProtectData(const AData: TBytes; const ADescription: string = ''; AForLocalMachine: Boolean = False): TBytes; and so forth. Of course a first compile with me integrating this into a test project failed, because there is no Winapi.CryptDPAPI. I am a nice person, am I not? Well of course Gemini then said I was totally right, and that indeed everything required could be found in WinAPI.Windows. Then rambled on about why it got so confused, and basically blaming Embarcadero for not consistently placing specific API segments in their own units like has happened with WinAPI.Messages or WinAPI.ShellAPI. It then presented me with a corrected unit ready to be integrated into my project...or so it thought. In its implementation of ProtectData and UnprotectData it used a constant for a specific flag, and that did not go over well with the compiler: Here is what it said then 😄 It then fixed the unit by defining the needed constant correctly. But alas, more errors incoming. I'm still trying to be nice and perhaps lead the machine to realize its own mistakes 🙂 Yeah, it did not react to that slight hint but gave me a crash course on DPAPI. Only after I wrote basically rubbing its nose in the mess, it finally noticed and responded accordingly OK, I thought, that looks good. But it took a bad turn quickly yet again, because it continued with the following and provided me with a "revised" version of the unit where the only correction was more comments, and the constant was now called CRYPTPROTECT_LOCAL_MACINE_FLAG. Oh, goody. Now it really should work, but I didn't bother with a test compile, I was still feeling merciful and wrote I'm guessing by now it is trying to get rid of this issue as fast as possible, because the explanations and excuses are getting shorter and lamer Well, d'uh! So finally it comes up with the perfect reason: And follows up with the perfect solution for the home run: Note the proud addition of the checkmark, so this must be official... it even updated the entire unit. Now it must be right.... but wait, how did this get started again? I'm getting pretty good at shattering this machines dreams. I believe it's on to something here This actually sound correct, so I gave the revised unit a go. And it worked as expected. So that was about an hours worth of work, then had a lunch break and came up with some ideas for improvement. So with renewed strength and the feeling of being on the home stretch I wrote It obliged gladly and even provided me with a sample snippet of how to call this glorious code, which it also explained in depth. Actually this could be a nice side effect of AIs, if one takes the time to really read all that jibber jabber. Buuuuuuuut, again, the unit would not compile because how the AI thought TFileStreams needed to be handled. (I'm already out of patience...this short into the second half, oh my) It then went on and on and finally concluded that this wasn't even necessary because of how TFileStream.WriteBuffer takes care of that automatically. So that was needed to be done was to remove these erroneous calls to inexistent methods...Done, the newly improved unit was presented with a nice remark at the end Yeah, we'll see about that, I have more nuisance to test you with Prompt answer You see that too? Now it's just buttering me up! I sense troubles ahead. To my surprise, the new version worked right away. So I got bold Just that one method...but Grrr...at this point I was happy with the one change for the Protect method, and ignored the Unprotect. Copying only parts of the code now. It worked. Again I was provided with samples for calling and quite extensive explanations on the whys and hows. A neat learning experience I completed by asking some questions concerning this technique and security aspects (i.e. could one know how this file was encrypted?)) and possible issues when running this in a Citrix environment. I feel the answers given where quite good and sounded altogether correct. All in all this has been a pretty cool experiment with the free version of Google Gemini 2.5 Flash. I know there is a Pro version, but I'm not yet ready to spend money on that. Please note I did the session in German, so some translation errors might have slipped in either on my side or the AIs. The entire session can be viewed here: https://g.co/gemini/share/a6d5936220bf
-
I'm kind of baffled that some folks suggested to do this with HTML....does that compile into a standalone application nowadays, not requiring a browser to run? I mean, the background is supposed to be a desktop, isn't it?