Embarcadero: Firemonkey OOP
Embarcadero: Firemonkey C++
This is so cool: How to deploy a Delphi OSX project from the command line – kouraklis.com [WayBack] I always wanted to hack the communication path to PAServer [WayBack] – despite issues – but never had the time. Luckily others had… See: Automated deployment of a Delphi OSX project from the command line | Vladimir’s development blog [WayBack] […] … Read More
It has been long time since I wrote a summary blog post, so this is just a collection of highlights. I'll try to get back to a decent frequency. Official Embarcadero News As you probably know we released RAD Studio Berlin Update 1. Check this blog post if you missed it. Embarcadero is making our tools available to schools and universities. For free. Read the press release "Embarcadero Academic Program Offers Free Software Development Tools to Students" at http://www.businesswire.com/news/home/20160825005680/en/Embarcadero-Academic-Program-Offers-Free-Software-Development The company is also pushing on Windows 10 Anniversary Update support (with more features to come) but has announced that the Starter edition is remaining free. This is less powerful than the free edition for students, so it is more geared towards hobbyist and casual users, or anyone who wants to get started. Read the specific press release "Embarcadero Announces Support for Windows 10 Anniversary Update and Launches FREE Starter Edition" at http://www.businesswire.com/news/home/20160919006025/en Update 1 and Operating Systems My own tweet "My Nexus 5X running Android N with a notification from a Delphi app running on it" at https://twitter.com/marcocantu/status/775621077309489153 "Build apps for macOS Sierra and iOS 10 with RAD Studio Berlin Update 1" by Sarina at http://community.embarcadero.com/blogs/entry/build-apps-for-macos-sierra-and-ios-10-with-berlin-update-1 Technical Blog Posts New "Migration and Update Center" on the Embarcadero web site, for anyone with projects on old versions of Delphi and C++Builder, available at https://www.embarcadero.com/rad-in-action/migration-upgrade-center "18 Code Samples Highlighting New Features In RAD Studio Berlin" by Eli at http://community.embarcadero.com/blogs/entry/18-code-samples-highlighting-new-features-in-rad-studio-berlin. And also by the same author and Delphi MVP, "Three Ways To Easily Embed A Database With Your Android And IOS Apps" at http://community.embarcadero.com/blogs/entry/three-ways-to-easily-embed-a-database-with-your-android-and-ios-apps Holger got back to blogging about Delphi, see https://flixengineering.com/blog. Great move! There are several very nice and technical blogs posts... Interesting post by Warren, focused on cleaning your code from past bad habits, "Delphi Features I Avoid Using And Believe Need to be Gradually Eliminated from Codebases" at http://delphicodemonkey.blogspot.it/2016/09/delphi-features-i-avoid-using-and.html Rather old but worth highlighting, is Jim's Top Ten Reasons to be a Delphi Developer at http://delphi.org/2016/07/top-10-reasons-to-be-a-delphi-developer/ Roman on EncodeString at http://blog.kassebaum.eu/?p=476 Jordi on using REST to talk with a Raspberry Pi at http://thundaxsoftware.blogspot.it/2016/09/delphi-rest-client-that-talks-to-rest.html Documentation and Books Petar shares the Word document of his detailed and very well researched book on Delphi's Parallel programming Library at https://onedrive.live.com/view.aspx?resid=400D26E601B2ABA2!143753&ithint=file%2cdocx. Kudos for the initiative. Already 50 pages of technical content, and open to contributions. Did I mention Delphi Succinctly free ebook already? It was written by another Italian and another Marco: https://www.syncfusion.com/resources/techportal/details/ebooks/delphi. Good job. Third Party Tools Not really a Third Party tool, as it comes from Idera, but if you are using PowerShell you might be interested in this editor: https://www.idera.com/productssolutions/freetools/powershellplus/powershellregistrationform A great review of a great product, Nexus Quality Suite at http://delphicodemonkey.blogspot.it/2016/08/nexus-quality-suite-why-profiling-and.html Roman updated IMAPSize (a very popular IMAP tool) to the latest Delphi, read more at http://blog.kassebaum.eu/?p=488 And Finally Read the latest "Flotsam and Jetsam" post by Nick at http://www.codingindelphi.com/blog/flotsam-and-jetsam-116/. Nick is joining Embarcadero and I'm sure it will be a pleasure to work with him.Read More
In TMS VCL Cloud Pack v3.7, new components TAdvmyCloudDataConnection and TAdvmyCloudDataDataSet have been added. With these 2 components, access to structured data on the cloud via the myCloudData service becomes easier than ever.
TAdvmyCloudDataConnection is a non-visual component that manages access to myCloudData. It works as the intermediator for the authentication and authorization to access myCloudData for one or multiple TAdvmyCloudDataDataSet instances. This means that via the TAdvmyCloudDataConnection at least a one-time authentication and authorization is done with myCloudData to obtain the access token and the TAdvmyCloudDataDataSet can then work through TAdvmyCloudDataConnection to use this access token. To let the TAdvmyCloudDataDataSet use the connection is as simple as assigning the TAdvmyCloudDataConnection instance to TAdvmyCloudDataDataSet.Connection, just like we are used to assign a TADOConnection to a TADOTable for example.
TAdvmyCloudDataDataSet is a wrapper as a dataset of a table in the myCloudData service. When a connection is provided, set either the name of the table via the Table property or the unique ID of the table via the TableID property. When a connection has been made (i.e. access token was obtained), setting the property TAdvmyCloudDataDataSet.Active to true will fetch the table data from the myCloudData table and present it as a TDataSet through a TDataSource to any DB-aware component in VCL or via LiveBindings in FireMonkey applications.
Note that this approach works both at run-time and design-time, so we can work with the cloud data at design-time to configure our DB-aware controls connected to it.
An easy way is provided to perform basic dataset filtering. The TAdvmyCloudDataDataSet has a filter property which is presented as a collection of filter conditions. The filter condition consists of a field name, filter value, a filter condition logical operator and a filter comparison operator. The filter condition can be easily set at design-time where the dataset field can be picked and the values set.
From here we can work with the cloud data in much the same way from our code on the dataset as Delphi developers have been doing all the time with datasets, i.e. insert, delete, update records.
But with the updated myCloudData service, there is much more than this possible as myCloudData now offers rich metadata for its structured data. This rich metadata can be programmatically accessed, created and updated but also easily configured via the myCloudData web interface. We’ll cover this in a follow-up blog focused on how we can benefit from this rich metadata, but here you can already glance over the web interface you can access from your myCloudData account:
You can explore all this with a free myCloudData account. Create a new table via this account and you can use our TAdvmyCloudDataDataSetDemo application included in TMS VCL Cloud Pack to explore this.
Stay tuned for more!
In about 2 weeks ITDevCon 2016 will start! The agenda is final since one week already, with most of the speeches already defined months ago. You can check the agenda here: http://www.itdevcon.it/en/agenda We have 15 speakers from all over the world, from Brazil to Slovenia, from Germany to Italy; lot of contents, lot of topics. Almost […] … Read More
Today, Embarcadero has released the first update of RAD Studio, Delphi, and C++Builder 10.1 Berlin, with many quality enhancements and some new features. The new features include a version of the FireMonkey Grid control for iOS ,based on the native platform control, several other FMX enhancements, and support for iOS 10 (in particular the simulator) and improved compatibility for the coming macOS Sierra. In terms of fixes, the C++ compiler has several improvements (almost 20), but also the Delphi one has a few issues (about 5) rounded up. All areas of the product have fixes and improvements, including an annoying DataSnap/REST issue, FireDAC, VCL, RTL, the IDE, the installer.... with over 100 public reported bugs fixes, and over 300 total (including internally reported issues). Full description of the fixes to publicly reported bugs can be found at http://edn.embarcadero.com/article/44715 More information is also in the docWiki at http://docwiki.embarcadero.com/RADStudio/Berlin/en/Subscription_Update_1 If you are a registered user of 10.1 Berlin, you can download: - the new GetIt based installer at http://cc.embarcadero.com/item/30613 - the ISO with the traditional installer at http://cc.embarcadero.com/item/30615 Before installing Update 1 you need to uninstall the RTM version of Berlin, even if the GetIt based installer doesn't prompt you to do so. You should be able to retain your configuration and installed third-party packages. Update: As reported, GetIt based uninstall/install does nto preserve registry settings. Read about a workaround here: blog.marcocantu.com/blog/2016-september-migrationtool_update1.html If you don't have a license to 10.1 Berlin, we have some great offers: mobile is free with Professional and there is an overall 10% "Update 1" special discount, plus you receive the free bonus pack with Konopka Controls, Radiant Shapes, and the PDF of my Object Pascal Handbook updated for 10.1 Berlin. More information on the offers, valid until September 30th, at https://www.embarcadero.com/radofferRead More
A couple of years ago (exactly!) I posted on this blog about an article I’d written on accessing NFC tags from Delphi Android applications. At the time this was quite an involved exercise, requiring custom Java code to be compiled and linked in to the application in order to respond to the pertinent Android callback, Activity.onNewIntent. Indeed, Delphi versions XE5, XE6 and XE7 all has slightly differing capabilities, with each new release making certain Android operations rather easier. While catching up on what’s new in recent releases of Delphi I realised a change had been snuck into Delphi 10 Seattle that makes the whole NFC exercise much more straightforward now in Delphi. What this change means is: No more custom Java code required! No more linking in a custom Java library file No more activity custom subclassing! No more debugging obstacles! This change seems to have gone in completely under the radar*, escaping the attention of the documentation department, so I thought it best that I brought it out into the open. It turns out that the key activity callback that NFC foreground dispatch relies upon (Activity.onNewIntent) is now hookable from Delphi code (with the right know-how) and so all the Java shenanigans can be put behind us (at least in the context of NFC access). This callback is used in Android in all sorts of other scenarios as well, so if you find a requirement for responding to onNewIntent then Delphi 10 Seattle makes this something of a doddle. I have updated the article to show the more direct means of accessing NFC from Delphi 10 Seattle and later and provided corresponding updated samples for Delphi 10 Seattle and Delphi 10.1 Berlin. You can find the full details and code there. In short, though, new intents are picked up in the FireMonkey activity’s onNewIntent method and sent into the RTL cross-platorm messaging system. You can write message-receiving code to pick up new intents and process them, This intent messaging is done via an additional (and seemingly undocumented) use of the Android-specific TMessageReceivedNotification message. If you are playing with NFC cards in your apps you can simplify the setup very nicely in the most recent versions of Delphi. Just to round this topic (given the blog subject) off I’ll also mention that another activity callback, onActivityResult, is also covered by FireMonkey and has been since Delphi XE6. This is also wrapped up in the same messaging system, though this time with the TMessageResultNotification message. I showed an example of how to use this to pick up information about a scanned barcode (scanned by the popular and open Source ZXing, or Zebra Crossing, barcode scanner app) in an article about launching various activity types back in April 2014: Launching activities and handling results in Delphi 6 Android apps. * Update [16/09/2016]: I have since discovered that both Delphi 10 Seattle and Delphi 10.1 Berlin ship with an Android intents demo that does in fact utilise this feature. The demo is located at: Delphi 10 Seattle: %PUBLIC%\Documents\Embarcadero\Studio\17.0\Samples\Object Pascal\Mobile Snippets\AndroidIntents, documented here Delphi 10.1 Berlin: %PUBLIC%\Documents\Embarcadero\Studio\18.0\Samples\Object Pascal\Mobile Snippets\AndroidIntents, documented here The most up to date version of the demo can be found in the Delphi 10 Seattle Sourceforce repository or the Delphi 10.1 Berlin Sourceforge repository.Read More