Delphi XE2 Foundations - Part 3 by Chris Rolliston

By Chris Rolliston

Half three of a complete advisor to the language and middle non-visual libraries of Embarcadero Delphi XE2; during this half, programs, RTTI, interoperability and multithreading performance are all coated. Adopting an built-in strategy, the e-book covers either more recent and older good points along each other. it is also insurance of XE2's help for Mac OS X.

Show description

Read or Download Delphi XE2 Foundations - Part 3 PDF

Similar languages & tools books

Delphi XE2 Foundations - Part 3

Half three of a finished consultant to the language and center non-visual libraries of Embarcadero Delphi XE2; during this half, programs, RTTI, interoperability and multithreading performance are all coated. Adopting an built-in technique, the ebook covers either more moderen and older good points along each other.

Beginning CareKit Development: Develop CareKit Applications Using Swift

This ebook deals readers an attractive advent into growing CareKit dependent purposes utilizing the quick language. It starts off with the fundamentals and offers a step by step advisor to studying all facets of constructing a CareKit iOS program which could function the root for a sufferer care plan. starting Carekit improvement introduces the main modules and ideas of CareKit starting up by way of fitting and development the open resource framework.

Additional resources for Delphi XE2 Foundations - Part 3

Example text

Rtti unit, and while it plays an important role in Delphi’s extended RTTI support, it can be used independently of that. AsType< string>; //runtime exception end. Having assigned (boxed) an instance of one type, there is nothing to stop you assigning an instance of a different type. AsType< string>; //OK end. Assigning and retrieving data from a TValue In the two examples so far, items have been boxed with simple assignments. This works for the more common types — floating point numbers, Booleans, classes, metaclasses and interfaces, as well as strings and integers.

Consequently, the package can simply inject what it likes in the initialization section of a contained unit, and clean up in a corresponding finalization section. Or at least, that’s the basic principle. There is one small wrinkle though: in both FireMonkey and the VCL, child controls are automatically destroyed when their parents are destroyed, regardless of whether their parent is also their ‘owner’. Because of this, the finalization section of a package should be careful not to call Free on what has become a ‘stale’ reference, something possible if the packaged control was injected into a form that was then freed before the package itself was unloaded.

Simply changing the targets to OS X will not just work similarly however. The reason is that the host application’s deployment settings need to be configured to deploy the custom BPLs into the host application’s ‘bundle’. To do this, first compile each of the packages we created, using the ‘Release’ build configuration and OS X as the target platform. Next, set the host application as the active project, and select Project|Deployment from the main menu bar. This will cause a new ‘Deployment’ tab to be shown in the editor.

Download PDF sample

Rated 4.75 of 5 – based on 19 votes