background preloader

Pascal

Facebook Twitter

Actions, Action Lists And Action Managers. (updated for Delphi XE3) Brian Long (www.blong.com) Table of Contents Click here to download the files associated with this article.

Actions, Action Lists And Action Managers

If you find this article useful then please consider making a donation. It will be appreciated however big or small it might be and will encourage Brian to continue researching and writing about interesting subjects in the future. Introduction Actions and action lists were introduced into the VCL by Delphi 4 in June 1998 (in all flavours of the product) and were apparently considered so important that they were the first addition to the Standard page of the Component Palette since Delphi was released back in February 1995.

In 2012 Delphi XE3, C++Builder XE3 and RAD Studio XE3 have added the first iteration of action support into the FireMonkey cross-platform framework. It would appear that at the time of writing, over 14 years after the introduction of actions, these potentially very useful components have been much under-used by the Delphi community. Delphi File Extensions - Delphi Programming. New Delphi language features since Delphi 7. OptimalCode – “Delphi Optimization Guidelines” - DelphiTools.info. Unleash the Power of Delphi RTTI - Pascal and Delphi Tutorials - CODECALL. RTTI stands for RunTime Type Information.

Unleash the Power of Delphi RTTI - Pascal and Delphi Tutorials - CODECALL

Simply put, it provides information that is only available in run time, not in coding/design time. For example, using RTTI you can examine whether an object/class has property with specific name and if it has, you can examine whether the property is read only, read-writable, or write only. With this information at hand, you can retrieve the property current value and even modify it (if it's writable). For Delphi itself RTTI is playing very important role, since gui designing in Delphi relies heavily on RTTI. Values you can inspect and modify in the object inspector is provided through RTTI.

RTTI is not only limited with manipulating properties. Type {$M+} TRTTIEnabledClass=class end; {$M-} Beside specifically use {$M} directive, we can also derive our class from TPersistent which was declared with {$M+} on. Base Class Here we will write a base class that enable RTTI access to it and also has methods supporting RTTI based command. Neater, I believe. XML Documentation Comments - RAD Studio XE3. Go Up to Code Editor Overview XML Documentation comments are: Introduced with a triple-slash (///).

XML Documentation Comments - RAD Studio XE3

Structured using XML tags. Folded and unfolded like a regular code block or region (see Using Code Folding.) XML Doc comments are displayed in Help Insight (if parsed successfully) and, also, are included by the compiler when generating XML Documentation (as devnotes XML elements). The XML tags must be properly closed, such as <para>...

Example of a Delphi function with XML Documentation comments For more examples of XML DOC comments, see the following source files: DSServer.pas DSCommonServer.pas DSHTTP.pas XML Elements You can use the following elements in XML DOC comments: A summary of the target function or class A paragraph Text in fixed-width font Preformatted text, such as source code Remarks regarding the target function or class The name and description of a specific parameter Reference to a specific type, symbol, or identifier Description of the return value of the target function. Object Pascal Style Guide. fColibri: delphi_generics_ Delphi Basics.