-
Content Count
569 -
Joined
-
Last visited
-
Days Won
11
Everything posted by corneliusdavid
-
Thinking about the original question here a little more, I think the problem might be related to the OS: I think most developers run Delphi on Windows 10, which would have all the libraries a typical Windows user would need for a variety of applications. But Windows Server is not an end-user operating system so leaves many things out. It may be that a manual install of .NET or related libraries/tools may need to be done in order for Delphi to work properly on Windows Server.
-
I find refactoring often broken in that it doesn't work but it (to my knowledge) has never crashed Delphi. Out of curiosity, I moved the "refactoride280.bpl" value to a different key, restarted Delphi, and refactoring was no longer in the menu. Theoretically, that's one .NET package out. However, I noticed there's another one named, "dotnetcoreide280.bpl." That's obviously got something to do with .NET. I tried removing that and now compiling a small cross-platform app in Delphi 11.1 gives me the error, "Object reference not set to an instance of an object." I put the registry key back and it compiles fine.
-
windows64 application crashes on form resize
corneliusdavid replied to Michael Collier's topic in Cross-platform
What version of Delphi? Do you have code in the OnResize events? Can you create a small example program that demonstrates this problem? -
This is getting off-topic but... I never use the database-level account feature but use one application-level account to connect to the database then provide a login that checks against a user record for authentication. So if your application is built to require database account credentials before connecting, then you're right, the approach I suggested would not work.
-
Why isn't this dangerous, or is it?
corneliusdavid replied to Renate Schaaf's topic in Algorithms, Data Structures and Class Design
Create/Free are the calls that allocated/deallocate the memory for an object, an instance of TDoSomething in this case. In your original code, the call to Create in Button1Click but the Free happens in a procedure of TDoSomething--that's where the difference in context is. The only reason it didn't blow up is because you don't reference the object (the DoSomething var) after the call to Free. Look at my first example code above where I point out where an ERROR could occur--that's what COULD have happened to you. -
Why isn't this dangerous, or is it?
corneliusdavid replied to Renate Schaaf's topic in Algorithms, Data Structures and Class Design
I don't think I've ever seen a procedure of a class free the instance of the class it's being called from. Everything in me is screaming DON'T DO IT! This is very bad practice. The object code may still be in memory after the call to Free but it's no longer dedicated to that object and if, per chance, some other operation suddenly uses that available memory, you've got an access violation. And to make an example that shows the problem of the dangling pointer @Attila Kovacspoint out: procedure TForm1.Button1Click(Sender: TObject); begin var DoSomething: TDoSomething := TDoSomething.create; DoSomething.DoSomething; if Assigned(DoSomething) then begin ShowMessage('DoSomething Freed but dangling reference still exists'); DoSomething.DoSomething; // <--- ERROR! end; end; It's better to free the memory outside of the class itself in a try-finally block: procedure TDoSomething.DoSomething; begin ShowMessage('Doing something'); end; procedure TForm1.Button2Click(Sender: TObject); begin var DoSomething: TDoSomething; DoSomething := TDoSomething.create; try DoSomething.DoSomething; finally DoSomething.Free; end; end; This makes it obvious from the calling procedure (the button click event) that the object is freed which lessens the likelihood of using it again because it's right there in the procedure instead of hidden in the class itself. -
There's no one perfect way that everyone should use. Personally, I use two different approaches: If a program uses a database, I keep all the configuration settings in there except for the path/server/port of what is needed to connect to the database and those are set in an .INI file in the same folder as the application during installation. The installer has admin rights so it can create files under Program Files, and the database settings should never be changed--except by an administrator. In this case the INI filename is simply: ChangeFileExt(Application.ExeFilename, '.INI') If a program doesn't use a database and has several options to configure when the program is in use by regular users, the INI filename is: FAppDataPath := TPath.Combine(TPath.GetPublicPath, ChangeFileExt(ExtractFileName(Application.ExeName), EmptyStr)); ForceDirectories(FAppDataPath); FAppConfigFilename := TPath.Combine(FAppDataPath, ChangeFileExt(ExtractFileName(Application.ExeName), '.ini')); This puts the file in a folder under %ProgramData%\MyApp making it global for any users on the computer.
-
Command-line build slower than IDE build
corneliusdavid replied to Raphaël's topic in Delphi IDE and APIs
That's not the whole command line; the project file is missing and it looks like an option is cut off. The command-line run by the IDE is likely several lines long as it lists all the library, include, search, resource, and output paths specified in your Delphi environment. -
Here's a better page that provides links for deploying the files for various platforms using the ToGo license you get with the Architect Edition: https://docwiki.embarcadero.com/InterBase/2020/en/ToGo_Quick_Start
-
Deploying InterBase requires different files on different platforms. Is this a Windows-only solution or mobile? You might be able to use your IB ToGo license. Start here (it gets complicated): https://interbase.com/deploy/
-
Delphi 11.1 is available
corneliusdavid replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
I'm a relatively new MVP and have been reading this thread without saying much (partly because I've been away from the computer and partly because I'm new and just listening). The title, at least in my case, was awarded in recognition for what I already do--support the Delphi community. I have been the coordinator for the Oregon Delphi User Group for many years and have been keeping it active. I was also blogging once in a while and was in the middle of writing a book about Delphi. There aren't many hard-and-fast requirements, just keep doing what I'm already doing but maybe a little more frequently; I'm also encouraged to help with beta testing and support forums such as this which I do as I'm able. Yes, we're supposed to be cheerleaders, and I'm happy to do--that but I don't do it blindly and I don't consider myself a paid shrill. I know there are problems with Delphi--I've encountered access violations, refactoring doesn't always work, I miss the Parnassus plugins, etc. There are problems in virtually every piece of software under the sun and if you visit forums for other products, even Microsoft tools, you'll find complaints and frustrations aired there as well (I've read horror stories about trying to develop cross-platform .NET apps with Xamarin; and did you ever write a major app in Visual BASIC then want to upgrade to the latest version? Good luck!). Perhaps there are an inordinate number of major flaws with Delphi but I still seem to be productive--and positive. Maybe it's because I don't do much with high DPI yet or haven't encountered major debugger flaws or some of the other things mentioned as deal-breakers for people--I don't have good answers for them. I do find discussing work-arounds, reporting bugs, and voting for the issues important to me, and yes, talking positively about the features of Delphi or products from Idera and Embarcadero I find really cool, to be much less stressful. I don't profess to know what goes on behind the scenes of Embarcadero but I've worked for enough companies to know corporate decisions often are the cause for features released too early, yet policy heavily restricts what can be said--and that's often very, very little. So I agree that we need to keep discussing the issues and keep reporting/voting for issues on Quality Portal but I hope my humble perspective is helpful to someone. Oh, and for the record, I have a paid Enterprise subscription. -
Oh, that's right--I forgot about that! I often prepend the filename with the application's path in which case the above scenario I described happens.
-
There are lots of other good suggestions here but I'll just add one thing to check. By default, Delphi projects set their Output directory to .\$(Platform)\$(Config) meaning that while your project (and possibly your .INI file) are in a folder like \MyProject, the .EXE would be in \MyProject\Win32\Debug (for a Win32 app compiled with the Debug configuration). When it runs, it's running from \MyProject\Win32\Debug and therefore doesn't see the .INI file two folders up. When you specified the full path, it likely saved it (as @Attila Kovacspointed out) so that next time it ran, it found the second copy of the .INI file. This has caught me a few times and now I always check the project's Output directory setting. The possible reason you haven't seen this before is either you had set the Output directory (and forgot about it) or you were using a much earlier version of Delphi (before multiple platforms) that left .EXEs in the same folder as the project.
-
Excellent! Me too.
-
Can someone provide inbound and outbound ports used by IDE?
corneliusdavid replied to Stéphane Wierzbicki's topic in Delphi IDE and APIs
There's really nothing more than the standard web ports I mentioned earlier. You can run the IDE to build apps without internet connection. Today's modern software is delivered over the internet so it's to be expected that you'd need an internet connection for installation, updates, and to get add-on styles and libraries through GetIt (which uses a REST API over HTTPS). But after that, I can't think of any special ports or addresses required for normal use of the Delphi IDE. If you could please list specific error messages you're seeing, that would help. -
Sorry, I wasn't clear: Those folders are added to the Windows System Path (outside of Delphi). And after the standard install, Delphi's Library Path should contain: $(BDSCOMMONDIR)\Dcp $(BDSCOMMONDIR)\Dcp\$(Platform) After JCL/JVCL is installed, the Delphi Library Path should additionally contain: <base jcl install path>\jcl\jcl\lib\d28\win32 <base jcl install path>\jcl\jcl\source\include <base jcl install path>\jvcl\jvcl\lib\D28\win32 <base jcl install path>\jvcl\jvcl\common <base jcl install path>\jvcl\jvcl\Resources for Win32 development; equivalent ones for Win64 development. Several source folders were added to Delphi's Browsing path as well: <base jcl install path>\jcl\jcl\source\common <base jcl install path>\jcl\jcl\source\windows <base jcl install path>\jcl\jcl\source\vcl <base jcl install path>\jvcl\jvcl\common <base jcl install path>\jvcl\jvcl\run Hope this helps.
-
Can someone provide inbound and outbound ports used by IDE?
corneliusdavid replied to Stéphane Wierzbicki's topic in Delphi IDE and APIs
This isn't an official answer and I don't know how helpful this will be but I looked at the Windows Firewall settings on a virtual machine where I use both Delphi 10.4 and Delphi 11.1 and didn't see any specific ports open but several applications that are allowed for in-bound communication: So, only for remote debugging or RAD Server. If anything, it's likely using the standard port 80 (HTTP) or 443 (HTTPS) for outbound calls but you should be able to use it without an internet connection after the initial license verification. -
I installed JCL/JVCL after pulling the latest from GitHub and running the supplied install batch files--and it installed fine. If you installed D11 into the default folder, you should have four folders added to your path: C:\Program Files (x86)\Embarcadero\Studio\22.0\bin C:\Program Files (x86)\Embarcadero\Studio\22.0\bin64\ C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\Win64
-
Systemic failing of Embarcadero development and support or am I just paranoid ?
corneliusdavid replied to CyberPeter's topic in General Help
I totally agree. It frustrates me to no end to see and hear about problems in the product but not have any response or idea when they'll get resolved, if a feature is dropped, what the priority is, or ANYTHING. Just someone saying, "sorry it's late, we're working on it but are slammed" or something would be better than silence. So often, I see businesses just trying to pretend everything is OK when customers are clamoring for answers. I always give my customers reasons for being late, even if they've heard them before--they appreciate knowing I'm still alive and are listening to their cries. -
Delphi 11.1 is available
corneliusdavid replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
Excellent! I like that method much better. -
Delphi 11.1 is available
corneliusdavid replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
This isn't a "new" version (like 10.4 Sydney over 10.3 Rio), this is an in-place, dot-release update to 11 Alexandria. Yes, it uninstalls your current version 11.0 installation (if you installed it). Strange that the numbering scheme is a little different than the 10.x series (e.g. 10.1 Berlin and 10.0 Seattle). -
Sorry I hadn't seen your question from a few days ago but glad you found the solution.
-
Try putting a TLayer3D on the cube (as a child object) and then adding a TLabel to that. To make the TLayer3D transparent, check Transparency property and make sure the Fill.Kind property is set to None (sometimes you have to toggle that to Solid and then back to None to get it realize it really should be transparent).
-
I have less experience on the Mac but each app deployed has several sub-folders with different supporting parts like libraries and resources, so with a little study, this should be quite doable.
-
Start here: https://firebirdsql.org/ Lots of links to documentation, support tools, and community blogs, etc.