-
Content Count
627 -
Joined
-
Last visited
-
Days Won
11
Posts posted by corneliusdavid
-
-
While AI is not built-in to Delphi, I recently used ChatGPT to help me write a Delphi function, saving me several hours. I'm sure there's a future IDE plug-in that will incorporate this somehow.
However, I agree that Delphi has fallen behind other tools--and will likely never catch up as the industry is moving faster than the small, incremental enhancements that come with each release.
-
-
12 minutes ago, Anders Melander said:Format would like a word with you about that.
If course, if using untyped or variant parameters, but OP declared the test procedure with a specific type (Int64--I mistakenly mentioned floating point), which would not compile.
-
I've actually wondered about this myself. Isn't the purpose of the unit test to test what happens if you get invalid parameters? So this test would be expected to fail because invalid parameters (string) were sent in to a function expecting floating point.
However, I suppose it could be argued that a calling a function whose parameters require a floating point, would not even compile in Delphi if sending a string, so a unit test of this sort is pointless?
-
1
-
-
Yes, that's always the case: \\server\sharename or \\server\sharename\subfolder.
Note that there doesn't necessarily have to be a folder added on to that as the "sharename" part already points to a folder--the shared folder. Also, for hidden shares, the sharename will end with a "$" (at least on Windows).
-
@Columbo, I had a few minutes and explored this technique of loading a TImageList dynamically a little more for my own curiosity and wrote a test program. The attached project loads a memory table with some local bitmaps, then as you scroll through the table, it pulls the image out of the table and clears/refreshes the image list which is associated with the page control. It should get you close to what you want.
-
1 hour ago, Columbo said:I need to know how to place these images into the tabs programmatically
Look at the help for TImageList.Add. There's a code sample that shows how to load a selected image file from disk. You can extend that to your database by either saving out the image to a temporary file or streaming it directly to a TImage.
-
2 minutes ago, Columbo said:So, using your code example, can I just replace the 'TColor($800000); with 'TColor(#502F0F' ?
Not with "#" but with a "$". Hex numbers in Delphi are prefixed with $.
Label1.Font.Color := TColor($502F0F);
-
For controls like TLabel and TEdit, you can use color constants defined in System.UITypes or specify your own as hex numbers; the TColor type is simply a UInt32 in the range -$7FFFFFFF-1..$7FFFFFFF.
For example, both of the following lines set a label's font color to navy:
Label1.Font.Color := clNavy; Label1.Font.Color := TColor($800000);
The TitleBar is a special case and you have to enable custom properties for it; watch this tutorial video on Creating Custom Title Bars from DelphiCon 2021.
-
31 minutes ago, Remy Lebeau said:since Delphi 6.
And I've probably used it sometime in the past--and forgotten about it. (*head slap*)
-
18 hours ago, msd said:if someone has experience with this topic, please share your ideas, experiences, and real stories.
Not sure how relevant this is or if it answers any of your questions but I switched form UniDAC to FireDAC last year. If I still used the Professional edition of Delphi, I'd still have UniDAC; if I needed Direct Oracle Access, I'd still use UniDAC. There are many other reasons to stay--this is just a short story of why I changed and what it took for my small apps.
-
1
-
-
3 hours ago, Stefan Glienke said:RandomRange - just saying
Well isn't that handy? How long has that been around? Found it back to at least 10 Seattle...
-
On 12/6/2023 at 11:02 AM, Remy Lebeau said:Something that is really annoying me since installing 12.0 is when I double-click on a .pas/.cpp file outside of the IDE, and the IDE is not running yet, the IDE is started, but it wastes time loading all of its default packages and layouts, and then opens the .pas/.cpp file, and then finally goes to the Welcome screen instead of the .pas/.cpp file. Loading the packages, the Structure view, the Palette, etc is all completely unnecessary and the Welcome screen is completely unwelcomed when I just want to view a file
That's why I changed the default Windows "open" action for .PAS files to just open them up in my text editor. I use Delphi to open projects and source files from within Delphi for programming and compiling but when just viewing something, I use a text editor. Most decent text editors (excluding Windows Notepad, of course) these days have syntax highlighting and while it may not be like what I have in Delphi, it's good enough for just looking at some code real quick.
-
2
-
-
On 10/28/2018 at 7:26 AM, osterhaegar said:It allows me to select the "Delphi version I use", which I simply can't, because it would be basically "All of them" (OK, everything >= Delphi 7). Maybe this should not be a single setting but a list?
On 10/28/2018 at 7:27 AM, Michael Puff said:Choose your main version. The one you work with most.
That's what I did. Then listed all of them I work with in my signature line. (Not that it really matters, of course, but I feel better more honest for declaring them.)
-
Just now, David Heffernan said:value2, value3, value 4 all have an off by one error.
DOH! Corrected:
value1 := random(250) + 1; value2 := random(250) + 251; value3 := random(250) + 501; value4 := random(250) + 751;
-
So you want 4 random values, one each in the ranges 1-250, 251-500, 501-750, and 751-1000, right:
Try this:value1 := random(250) + 1; value2 := random(250) + 250; value3 := random(250) + 500; value4 := random(250) + 750;
Each random number is restricted to a 250 range but adding a number to it puts it into different range brackets.
-
1
-
-
Personally, I think a space after the comment makes it a little more readable.
So I would opt for A1, B2, C2.
But more importantly, I think comments should follow code or be on a separate line--I think comments before code on the same line break the vertical continuity of a block of code, causing the statement to be missed when the eye scans down a page.
Therefore, like baka0815, I would much prefer a line-break option to move the statement to the next line.
-
-
9 hours ago, Lars Fosdal said:Who would select to use a closed source backend that doesn't scale
If you have a large Delphi application with years of history and you want to add a REST server with as little learning curve as possible, RAD Server is fairly simple to get up and running--using existing skills.
Scale? Did you know that RAD Server is deployed only as a module under the most popular web servers, IIS on Windows and Apache on Windows or Linux? I'm not sure what would scale more than that.
There are many closed-source products on the market that are chosen because they are simpler to use or offer more features than open-source equivalents. I'm not saying RAD Server is the best but it's certainly an option that is worth looking at and will be a good solution for some people.
-
It's just my read on it based on what I've seen.
2 minutes ago, Anders Melander said:they want you to buy the product
because they can make more money selling deployment licenses.
I guess time will tell.
-
4 minutes ago, Anders Melander said:Actually, IMO it is more likely that RAD Server will be discontinued before DataSnap is.
I highly doubt that. There have been a lot of updates to RAD server recently. Also on https://blogs.embarcadero.com/, there has not been one single article about DataSnap since 2020 while there have been 15 on RAD Server in that same time-frame.
-
DMVCFramework is a good way to build a REST server; it's open-source, well supported, and well documented but has a steep learning curve for newbies. RAD Server also allows you to build a REST Server but requires the purchase Delphi (or RAD Studio) Enterprise or higher, so it's not cheap if you don't already own that edition of Delphi.
But neither of those solutions are explicitly "database in the cloud" products. They can be written to access databases and provide remote data but you can also host a database in the cloud and access it remotely from a standard Delphi app using database components. There are many reasons why building a REST server is a much better way to go but just thought I'd mention the option as I have done both.
-
1
-
-
1 hour ago, dummzeuch said:On the first page of the wizard, there is a button for doing that,
It's the "Options" button and takes you to another page that is usually skipped; on that page, you can set the destination for both RAD Studio and the Catalog Repository folder, and also determine whether it's installed for "all users" (the default) or just the current user and whether or not to add a shortcut on the desktop.
-
4
-
-
2 minutes ago, Unktneemo said:Also, i have another instance running on other locations around the state, with RemoteApp. And they are working fine. Same windows, same software.
It began to fail recently. That is the strange thing.
Oh, some instances work fine? Then perhaps the users getting the error are accessing the one part of the program that doesn't work well with RemoteApp. It'd be interesting to know what the difference is between the ones that work and the ones that don't.
One thing I remember from testing is that the software seemed to work fine while the user was in the main program; messages popped up, multiple windows, database access, fine (with permissions set properly). But the software was split into about four applications and when they needed to launch an ancillary program, there were problems getting to it. RemoteApp likes to be in control of the programs that are launched and, IIRC, this was the biggest hurdle we faced.
How to upgrade to Delphi 12?
in Delphi IDE and APIs
Posted
You don't "upgrade" the IDE, you install 12 in addition to 11.3; later, when 12 is stable and you've moved all your projects over and no longer use 11.3, then uninstall 11.3.
As for the settings, it shouldn't take long to set them up--unless you select every single option to a non-default value. If there's a settings transfer tool, I don't know about it as it was never that much of a bother for me. If you customize all the colors, I'm sure you know about the IDE Theme Editor.
The only time-consuming part is if you have several GetIt packages (e.g. styles or sample projects or libraries). That can take awhile--which is why I wrote AutoGetIt.