-
Content Count
627 -
Joined
-
Last visited
-
Days Won
11
Posts posted by corneliusdavid
-
-
10 hours ago, Lajos Juhász said:Embarcadero made the decision to not integrate any AI yet due to possibility of security issues. Not every customer would be happy if an AI could see their source code
I don't understand why this would be a concern. Certainly, any AI built in would just be an interface to utilize your own AI account somewhere, right? Nothing would get automatically uploaded unless you hook it up and start using it. Just like Delphi has integration for git but you don't have to use git inside the IDE unless you tell it to and give it your account information.
Am I missing something?
-
2
-
-
On 5/16/2024 at 2:58 PM, CoeurdeLeon said:The AI tools I am using currently are: ...
Of all of these as of 5/16/24 I find Claude the best but still frequently lacking.
It was interesting seeing this list and the responses as I've only used the free ChatGPT about a half dozen times--I haven't considered getting into it seriously. But I decided I should look through these tools listed here (didn't know there were so many geared for programming!) and get up to speed since AI is here and being used and talked about everywhere these days--I'm starting to see how this could be quite a time-saver for many things.
Today, I was struggling with some untyped string parameters being passed into a function and it was failing to get the values properly after converting this old code from Delphi 5 to Delphi 12. I knew I had to add support for UnicodeCode types but I was struggling with how to get the value from the embedded pointer. I asked ChatGPT and it gave a pretty good answer--and it was correct but it only listed the new Unicode and WideString types. I wanted to be able to support ShortString as well. So, I posed the exact same question to Claude and it gave a nearly identical answer BUT included support for ShortString as well, noting the slightly different syntax (you have to dereference it while you don't with the new modern string types). I asked Claude about the difference and it gave a good answer about the history of string types and why ShortString has to be handled differently.
I'm very impressed and am about ready to sign up for Claude! (I like what I'm reading about it's "project" feature as well.)
Thanks all for your comments!
-
2
-
-
On 7/20/2024 at 8:17 AM, Miguel Jr said:what I want to know: is how do I use VCL in Delphi 7, or better yet, know that in the form I'm designing, if VCL is running? Because the VCL name does not appear in the components window.
By default, creating a new Windows Application in Delphi 7 uses the VCL framework. That was the default since Delphi 1--and actually is still the primary one on the menu today (unless you change it). So, if you select "Application" and not "CLX Application" from the New menu then you are creating a VCL application:
Once the application is created, you can look at the main form of your application. In addition to what @jonnyg said by checking whether it's linked to DFM or XFM resource, you can Ctrl+Click on one of the used units, such as Forms, and look at the comment header, which will tell you explicitly what type of component library is being compiled and linked in:
{*******************************************************} { } { Borland Delphi Visual Component Library } { } { Copyright (c) 1995-2002 Borland Software Corporation } { } {*******************************************************} unit Forms;
In newer versions of Delphi where VCL is not always assumed, the menu choices to create a project are more clearly specified. For example, in Delphi 11, this is the default New menu:
... and "Multi-Device Application" is using FireMonkey (FMX) as that is the only cross-platform visual library that comes with Delphi these days.
-
3 minutes ago, corneliusdavid said:The only problem I've had is that sometimes partial lines are returned as full lines, then the next NewLine event returns the full line.
Well, I feel silly. I just noticed a parameter in DosCommand's NewLine event that indicates whether it's a full line or not. Checking that now gives a cleaner log--no partial lines.
So, yeah, DosCommand works great!
-
2
-
-
AutoGetIt uses it to launch batch files. The only problem I've had is that sometimes partial lines are returned as full lines, then the next NewLine event returns the full line. Not sure if this is a problem in DosCommand or some OS-level buffering--never took the time to look deeply into it.
-
7 hours ago, Patrick PREMARTIN said:Isn't it what TDosCommand does ? (for Windows only)
That's what I was thinking. DosCommand works great and is pretty easy to use--no need to get into the intricacies of CreateProcess.
-
1
-
-
8 hours ago, dormky said:Such a shame.
It seems the Images property only exists for TButton. I've tried adding my bitmap to the property but it doesn't seem to work like the Glyph property (double click to edit). How am I supposed to add it ?
What is "such a shame"? Perhaps you're just unfamiliar with current best practices?
There are many components that use the Images property:
- TBitBtn
- TSpeedButton
- TCategoryPanelGroup
- TMainMenu
- TActionList
- TTabControl
- TPageControl
And many more. Plus, many third-party components use this property as well. It's far more versatile than the old Glyph property.
Search for articles and YouTube tutorials--you'll find plenty of information.
-
1
-
7 hours ago, dummzeuch said:The difference between updates and patches seems to be that updates change the version number on the about dialog and patches don't
I believe you're right as evidenced by both 12.1 and 11.3:
But back in XE series, some patches were referred to as updates:
7 hours ago, dummzeuch said:I have code in GExperts that identifies the current update and patch level in case some workaround or fix is necessary.
That's pretty nice and comprehensive code!
-
7 hours ago, Mr. E said:Do you know if Embarcadero publishes any list with the official version numbers of their products?
It sure seems like there should be but I can't find it. I think the Wikipedia page has a pretty good overview of the version history but it's unofficial, of course.
I've got a list of several Delphi About screens of several versions of Delphi and your 12.1 build number matches the one I have installed.
I've found that "patch" is often interchangeable with "update" when it comes to Delphi version numbers (although "update" seems more official and more often includes features while "patch" is more often used for bug fixes or missing files in the original installation).
-
1
-
-
1 hour ago, Vandrovnik said:is there documentation for Indy?
Visit the Indy page on Github and follow the Documentation link on the Wiki: https://github.com/IndySockets/Indy/wiki/Documentation
-
2
-
-
What kind of help are you looking for? Design suggestions?
- You could reduce the font size so the tab captions fit.
- You could show the tabs vertically instead of horizontally so you could see the tab text but it would take a lot of screen space.
- You could display icons instead of text on the tabs and then have a label at the top of the each tab's body area to identify the selected tab.
- You could detect the form factor and use different techniques on different devices to show more text on larger devices and less on smaller ones, putting the ease-of-use back on the user and their choice of device.
-
Is this a one-time input of historical data or is more data available from the API every day? Perhaps it makes sense to write a completely separate program that operates in the background and just pulls data into a local database on a regular basis and then your user-facing program interacts with the local database?
-
1
-
-
On 6/17/2024 at 5:54 AM, JonRobertson said:That sounds like much more code than necessary to me.
I totally agree. I don't think I have EVER created two forms to work with the same data--seems like tremendous unnecessary duplication of effort plus a maintenance nightmare to remember to have to make changes in two places any time you need to add or change a field or label or some other aspect of the form. And, as mentioned, it's as easy as checking the State property of the associated dataset or a flag variable if you're using non-data-aware controls.
1 hour ago, Tom Chamberlain said:use a 'wizard' type screen for creating these initial records
This would be the one exception I can imagine and makes sense to tightly control some required fields and help the user fill out the data properly but that's really a different purpose, sort of like creating a report or grid to view records in addition to the form that created them is also a different purpose.
-
26 minutes ago, tobenschain said:Can't figure out why BudSys_DB.Indexes.Count is zero
From the Delphi Help file on TSQLTable.IndexFieldNames...
QuoteIndexFieldNames is also used to link this table as the detail in a master/detail relationship. Each of these fields must be matched to a corresponding field from the MasterFields property.
Instead of explicitly setting the sorting and linking fields using IndexFieldNames, you can indicate them using an existing index. To specify the sorting and linking fields implicitly through an index, use the IndexName property instead.
Note: The IndexName and IndexFieldNames properties are mutually exclusive. Setting one automatically clears the other.
-
16 minutes ago, rossh said:no contextual F1 help on win32 functions?
So, just to make sure we're on the same page, I open up the Windows unit (or WinAPI.Windows), find a function with a stdcall that calls an external Windows DLL, like CreateRemoteThreadEx or GetFreeSpace or QueryIdleProcessorCycleTime (just to pick a few at random), place the cursor and hit F1 and it should take me to a Windows API Help, right? I think I remember seeing this many years ago but not recently.
I tried this in several versions of Delphi (XE, XE2, 10.1, 11.3, and 12.1); most of these pull up the generic "Code Editor - Getting Started with RAD Studio" help (some of the older ones have broken help files now). Some of them find specific (or related?) help, such as ToolsAPI.IOTAProcess60.GetCurrentThread and System.FindResource. But none of them brought up a Windows API local help file.
In both Delphi 11.3 and 12.1, the Help menu has Platform SDK Help > Windows Platform SDK Library and clicking that takes me to the learn.microsoft.com web site for Win32 API. I guess that's the best we have now.
-
20 minutes ago, Angus Robertson said:I've managed without all those tools for 25 years
Yes, you can manage, but you might be missing out on productivity features or tips for improving your code by not taking advantage of some of these tools, many of which are free.
-
2
-
-
6 hours ago, Jim McKeeth said:I'm running a survey on Essential Delphi Addins
There's a good collection of tools and plug-ins listed. There are a few I had not heard of and some I've only recently learned about through this forum. It's a good idea to periodically review the tools available and make sure they're used to their fullest potential. I'm looking forward to the webinar.
-
1
-
-
18 minutes ago, Lars Fosdal said:None of them
The question wasn't which version of Delphi has NO bugs, just which one has the fewest.
-
1 hour ago, Sherlock said:Uwe Raabe Has written a nifty tool to circumvent this
That looks pretty cool. I'm a little nervous about running a program that messes with such an important part of Windows operations but it looks like it would work well.
-
On 5/28/2024 at 8:00 AM, Remy Lebeau said:Using tricks like this to is how I've gotten several versions of Delphi installed on one box (along with everything else I use regularly). The PATH setting on my machine only takes 1,876 characters but when fully expanded, it's 6,327 characters long! Every time I install another version of Delphi, I ignore the "PATH is close to the limit" warning, then go edit it later, creating, for example, D23 to replace "C:\Program Files (x86)\Embarcadero\Studio\23.0".
-
6 minutes ago, Uwe Raabe said:and a bit more sophisticated
True but it's more than just RegEx--Grep also uses RegEx expressions.
reFind has some Pascal smarts in it; for example, when using #migrate to change a class and identifier in your code, it can add the new required units to the uses clause.
-
It's a batch file run by the Task Scheduler as administrator calling the sc command.
For me, it's an in-house copy of RAD Server, so just stateless web server API calls--no continuously connected client.
And to be clear, for a customer installation, I would purchase a license.
-
4 minutes ago, David Heffernan said:Isn't this just grep?
grep is just search; reFind is search and replace.
-
15 minutes ago, Uwe Raabe said:I have a task scheduled exactly for that
Same here. Pretty easy limitation to get around.
Devin AI - Is it already happening?
in General Help
Posted
First of all, I don't care if my code is used to help train an AI--in fact, I'd be honored! Second, I don't put top-secret stuff in code--or if I do (like a user-requested back-door) I either encrypt it first or (more often) keep it completely separate in external files not included with the source repository.
Third, from what I understand, only publicly available repositories (open source) can be legally used for analysis and AI training. And if you do include sensitive code, GitGaurdian can watch your code and immediately warn if you upload secrets or vulnerabilities that shouldn't be there.
There's a lot of different opinions to what I've said here; some people are very concerned about privacy and security (and I commend their concern and read their blogs), others don't know or care. I'm kinda in the middle: wary and take steps to protect obvious holes in my process, but I also don't bog myself down with trying to hide everything in constant fear of some large corporation knowing everything I do. I personally feel there's a lot more advantage in utilizing tools that save me time than there is hiding everything I do for fear it might possibly be used inappropriately. In other words, I have decided to trust policies that state my private code is private.
Besides, a vast majority of anything that needs to be kept private is in the database, not the code--and databases are never put on Github, of course.