Embarcadero’s annual coding event, CodeRage, starts tomorrow. It’s a series of events about Delphi and C++ Builder. There are talks by Embarcadero employees, software vendors with products for RAD Studio, Delphi and Builder and users. CodeRage 2018 lasts for three days and you can see the schedule here. Best of all, it’s free and open to the public. To register, go to CodeRage 2018.
Some C++ topics this year are:
- An interview with Bjarne Stroustrup!
- Game development for beginners
- C++ 17 in Builder 10.3
- Working with databases in C++
Embarcadero just came out with some wonderful news – community editions of C++ Builder and Delphi! (And in case you were wondering, by “community” they mean “free”.) Continue reading “Community Editions of Builder and Delphi!”
Problem: How to use the Gmail FireDAC Enterprise Connector
Solution tested on C++ Builder 10.2.3
CData is a company with a clever idea. It writes drivers that connect to various technologies and make them appear as if they were databases. Thus, knowing only SQL, you can read a CVS file, use Google’s Gmail, search with Microsoft’s Bing, link in to LinkedIn, and do many other things. CData and Embarcadero have partnered to create wrappers for these drivers in the form of components that you can use in both VCL and FireMonkey programs. Embarcadero calls these Enterprise Connectors. The rest of this post is a demonstration of how to use the Gmail enterprise connector in a VCL program. If you’d rather just see a summary of tips for using the connector, scroll down to the end of this post. If you’d like more background on enterprise connectors, see this post.
Continue reading “Using CData’s Gmail connector in C++ Builder”
Problem: How to use the CSV FireDAC Enterprise Connector
Solution tested on C++ Builder 10.2.2
CData is a company that makes drivers for databases. Although this may sound like a useful but prosaic product, CData has a clever twist. Their mantra is “See the world as a database” and their products take this to heart. They allow you to view many things that aren’t databases as if they were. Examples include accessing sites such as eBay, Instagram, Facebook, Twitter and Gmail; working with programs like QuickBooks, Google Sheets, Microsoft Office 365; and manipulating data that is in generic formats, such as JSON, XML and CSV. The idea is that by using just SQL you can now accomplish a lot more than querying databases. Well, that’s nice, but what does it have to do with Builder?
Continue reading “Using CData’s CSV connector in C++ Builder”
Problem: IDE won’t let you set certain default layouts
Solution tested on RAD Studio 10.2
An IDE desktop layout is a file that records the positions, sizes, contents and visibility of IDE windows. In the RAD Studio main menu bar, selecting View and then Desktops produces a sub-menu of operations related to IDE desktop layouts. One item is Set Debug Desktop, which lets you save the desktop layout that the IDE will use during run-time, i.e., when you’re running a program that you launched from within the IDE. Unfortunately, there are no similar provisions for setting the startup layout or the default layout. Here is how you can do it though.
Continue reading “Setting the default and startup layouts in RAD Studio”
Problem: FMX progress bar won’t update
Solution tested on C++ Builder 10.2
Suppose you’re doing a long calculation that doesn’t involve FireMonkey components. You’d like to update the user with a progress bar. You periodically take a break in the computations to update the progress bar. However, when you run your program, the progress bar doesn’t move.
The solution is to call
Application->ProcessMessages() after updating the progress bar.
Application is a global variable present in all FireMonkey programs. The code below is an example of the problem and its solution. (By the way, this problem also occurs with the animation indicator and other GUI elements such as a label, and you can solve it with the same technique.)
Continue reading “Updating a progress bar during long calculations”
In the previous part of this tutorial we downloaded and set up Howard Hinnant‘s date library. This is a library written in standard C++ that lets us work with dates much more easily than what we can currently do. We learned how to work around some potential compiler errors and how to create compile-time and run-time dates. In this part of the tutorial we’ll discuss the library’s error handling and efficiency, and then concentrate on doing calculations with the dates.
Continue reading “Tutorial Part 2- A Portable Date Library for C++”