Professional Documents
Culture Documents
(Download PDF) Delphi Cookbook Teti Online Ebook All Chapter PDF
(Download PDF) Delphi Cookbook Teti Online Ebook All Chapter PDF
https://textbookfull.com/product/day-of-the-delphi-1st-edition-
jon-land/
https://textbookfull.com/product/mastering-delphi-programming-a-
complete-reference-guide-primoz-gabrijelcic/
https://textbookfull.com/product/delphi-collected-works-of-
arthur-schopenhauer-illustrated-arthur-schopenhauer/
https://textbookfull.com/product/introducing-delphi-orm-object-
relational-mapping-using-tms-aurelius-john-kouraklis/
Parenting and Family Processes in Child Maltreatment
and Intervention 1st Edition Douglas M. Teti (Eds.)
https://textbookfull.com/product/parenting-and-family-processes-
in-child-maltreatment-and-intervention-1st-edition-douglas-m-
teti-eds/
https://textbookfull.com/product/the-arab-uprisings-in-egypt-
jordan-and-tunisia-social-political-and-economic-
transformations-1st-edition-andrea-teti/
https://textbookfull.com/product/introducing-delphi-orm-object-
relational-mapping-using-tms-aurelius-1st-edition-john-kouraklis/
https://textbookfull.com/product/expert-delphi-robust-and-fast-
cross-platform-application-development-2nd-edition-marco-cantu/
https://textbookfull.com/product/delphi-complete-works-of-
quintus-curtius-rufus-history-of-alexander-illustrated-quintus-
curtius-rufus/
Delphi Cookbook Second Edition
Table of Contents
Delphi Cookbook Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why Subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Delphi Basics
Introduction
Changing your application look and feel with VCL styles and no
code
Getting ready
How to do it…
How it works…
There's more…
Changing the style of your VCL application at runtime
Getting ready
How to do it…
How it works…
There's more…
Customizing TDBGrid
Getting ready
How to do it…
How it works…
There's more…
Using owner draw combos and listboxes
Getting ready
How to do it…
How it works…
There's more…
Making an owner draw control aware of the VCL styles
Getting ready
How it works…
There's more…
Creating a stack of embedded forms
Getting ready
How it works…
There's more…
Manipulating JSON
Getting ready
How to do it…
There's more…
Manipulating and transforming XML documents
Getting ready
How to do it…
How it works…
There's more…
I/O in the 21st century – knowing the streams
Getting ready
How it works…
There's more…
Creating a Windows service
Getting ready
How it works…
There's more…
Using the TService.LogMessage method
Associating a file extension with your application on Windows
Getting ready
How to do it…
There's more…
Be coherent with the Windows look and feel using TTaskDialog
Getting started
How it works…
There's more…
2. Becoming a Delphi Language Ninja
Introduction
Fun with anonymous methods – using higher-order functions
Getting ready
How to do it…
There's more…
Writing enumerable types
Getting ready
How to do it…
There's more…
See also
RTTI to the rescue – configuring your class at runtime
Getting ready
How to do it…
There's more…
See also
Duck typing using RTTI
Getting ready
How to do it…
There's more…
Creating helpers for your classes
Getting ready
How to do it…
There's more…
3. Knowing Your Friends – the Delphi RTL
Introduction
Check strings with regular expressions
Getting ready
How to do it…
There's more…
Consuming RESTful services using native HTTP(S) client libraries
Getting ready
Some HTTP considerations
How it works…
There's more…
THTTPClient's methods which directly map the HTTP verbs
How to verify that HTTP TRACE is disabled
Cope with the encoded Internet world using System.NetEncodings
Getting ready
How it works…
There's more…
Save space using System.Zip
How it works…
There's more…
Decouple your code using a cross-platform publish/subscribe
mechanism
Getting ready…
How it works…
There's more…
4. Going Cross-Platform with FireMonkey
Introduction
Giving a new appearance to the standard FireMonkey controls
using styles
Getting ready
How to do it…
How it works…
See also
Creating a styled TListBox
Getting ready
How to do it…
How it works…
See also
Impressing your clients with animations
How to do it…
How it works…
See also
Using master/details with LiveBindings
Getting ready
How to do it…
How it works…
There's more…
See also
Showing complex vector shapes using paths
Getting ready
How to do it…
How it works…
There's more…
Using FireMonkey in a VCL application
How to do it…
How it works…
There's more…
Reinventing your GUI also known as mastering Firemonkey
controls, shapes, and effects
Getting ready
How it works…
There's more…
5. The Thousand Faces of Multithreading
Introduction
Synchronizing shared resources with TMonitor
Getting ready
How to do it…
How it works…
There's more…
Talking with the main thread using a thread-safe queue
Getting ready
How to do it…
There's more…
Synchronizing multiple threads using TEvent
Getting ready
How to do it…
There's more…
Displaying a measure on a 2D graph like an oscilloscope
Getting ready
How to do it…
There's more…
Using tasks to make your customer happier
Getting ready
How it works…
There's more…
Monitoring things using futures
Getting ready
How it works…
There's more…
Parallelize using the parallel for
Getting ready
How it works…
There's more…
6. Putting Delphi on the Server
Introduction
Developing web client JavaScript applications with WebBroker on
the server
Getting ready
How it works…
Retrieving the people list
Creating or updating a person
Running the application
There's more…
Converting a console application to a Windows service
Getting ready
How to do it…
How it works…
There's more…
Serializing a dataset to JSON and back
Getting ready
How it works…
There's more…
Serializing objects to JSON and back using RTTI
Getting ready
How to do it…
How it works…
There's more…
Sending a POST HTTP request encoding parameters
Getting ready
How to do it…
How it works…
There's more…
Implementing a RESTful interface using WebBroker
Getting ready
How to do it…
How it works…
There's more…
Controlling remote application using UDP
Getting ready
How to do it…
How it works…
There's more…
Using app tethering to create a companion app
Getting ready
How it works…
There's more…
Creating DataSnap Apache modules
Getting ready
How to do it…
How it works…
There's more…
Creating WebBroker Apache modules
Getting ready
How to do it…
How it works…
There's more…
Using native HTTP(S) client libraries
Getting ready
How it works…
There's more…
7. Riding the Mobile Revolution with FireMonkey
Introduction
Taking a photo, applying effects, and sharing it
Getting ready
How to do it…
How it works…
There's more…
Using TListView to show and search local data
Getting ready
How to do it…
How it works...
There's more…
Using SQLite databases to handle a to-do list
Getting ready
How to do it…
There's more…
Do not block the main thread!
Getting ready
How to do it…
How it works…
There's more…
Using a styled TListView to handle long lists of data
Getting ready
How to do it…
How it works…
There's more…
Customizing the TListView
Getting ready
How it works…
There's more…
Taking a photo and location and sending it to a server
continuously
Getting ready
How to do it…
The client side
The server-side
There's more…
Talking with the backend
Getting ready
How to do it…
There's more…
Making a phone call from your app!
Getting ready
How to do it…
How it works…
There's more…
Tracking the application's lifecycle
Getting ready
How to do it…
There's more…
8. Using Specific Platform Features
Introduction
Using Android SDK Java classes
Getting ready
How to do it…
There's more…
Using iOS Objective C SDK classes
Getting ready
How it works…
There's more…
Displaying PDF files in your app
Getting ready
How it works…
Showing the PDF file on Android
Showing the PDF file on iOS
There's more…
Download the PDF file from the server
Sending Android Intents
Getting ready
How it works…
More complex intent – sending a full flagged e-mail
Starting an activity for result – the speech to text engine
There's more…
Letting your phone talk – using the Android TextToSpeech engine
Getting ready
How it works…
There's more…
Using Java classes in Android apps with Java2OP
Getting ready
How to do it…
There's more…
Doing it in the background, the right way – Android services
Getting ready
How it works…
There's more…
Index
Delphi Cookbook Second Edition
Delphi Cookbook Second Edition
Copyright © 2016 Packt Publishing
Every effort has been made in the preparation of this book to ensure
the accuracy of the information presented. However, the information
contained in this book is sold without warranty, either express or
implied. Neither the author, nor Packt Publishing, and its dealers and
distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Livery Place
35 Livery Street
ISBN 978-1-78528-742-8
www.packtpub.com
Credits
Author
Daniele Teti
Reviewer
Roman Yankovsky
Commissioning Editor
Priya Singh
Acquisition Editor
Rahul Nair
Deepti Thore
Technical Editor
Mohita Vyas
Copy Editor
Merilyn Periera
Project Coordinator
Shweta H. Birwatkar
Proofreader
Safis Editing
Indexer
Graphics
Disha Haria
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
Who this book is for
This book aims to help the professional Delphi developers in their
day-to-day job. This book will teach you about the newest Delphi
technologies and its hidden gems. It is not a book for a newbie, but
the practical approach will help you reach a new level with your
Delphi skills. The experienced developer can benefit from this book
because nontrivial problems are solved using best practices. Where
more than one way is available or the topic is too broad to be
explained in the available pages, references are provided to allow
you to go deeper in that field. It is a book to have on your desk for
the next few years.
Another random document with
no related content on Scribd:
263. Privy Council Record.
264. Act. Parl. x. 284.
265. Letter of Mr Duncan Forbes of Culloden (father of the President).
Culloden Papers.
266. Memoirs of Elizabeth West. Edinburgh, 1733.
267. D. Forbes’s Letter, ut supra.
268. Treatise on the Sanctification of the Lord’s Day.
269. Maitland’s History of Edinburgh, p. 202.
270. Elizabeth West.
271. Coltness Collections.
272. Historical Account of the Bank of Scotland, 4to, p. 6.
273. Diary of David Hume of Crossrig, p. 69.
274. Account of Bank of Scotland, p. 7.
275. Privy Council Record.
276. As to the troubles from the Coldingham meeting-house, see under March
24, 1694.
277. Privy Council Record.
278. A quaigh or drinking-cup.
279. Alluding to a controversy between two of the Aberdeen professors on a
question which we have seen revived in great fervour in our own day.
280. Privy Council Record.
281. Alexander Duff was descended from a race of gentry in Morayshire—the
Duffs of Muldavit—and it stems to have been by saving, prudence, and good
management that he was enabled to increase his share of the family possessions,
and so far advance the prospects of his house, that it was ennobled in the next
generation, and now ranks among the eight or ten families of highest wealth in
Scotland. There is a characteristic story about Braco surveying one day an
extensive tract of country containing several tolerable lairdships, when, seeing the
houses in various directions all giving out signs of being inhabited by their
respective families, he said: ‘A’ that reek sall come out o’ ae lum yet!’ and he made
good his word by ultimately buying up the whole of that district.
282. The above narration appeared in the Dumfries Journal (newspaper).
283. The system of culreach or repledgiation was one of great antiquity in
Scotland, but last heard of in the Highlands. So lately as 1698, George Earl of
Cromarty obtained a charter, giving him this among other powers: If any of the
indwellers and tenants of his lands should happen ‘to be arrested or attached
before any judge or judges, spiritual or temporal, in any time coming, to repledge
and call them back to the privilege and liberty of the said court of bailiery and
regality of Tarbat.’
284. Documents of the process in Spalding Club Miscellany, iii. 175.
285. Burns’s fine ode on Macpherson will be remembered: