Architecting and Building Model View ViewModel Applications John KouraklisDescripción completa
E-Book
Full description
DELPHI - ORACLE
Full description
Everything about creating custom components in Delphi. The ultimate source. That's why you love Delphi! I think we can all agree: components are essential elements of the Delphi environment. One ...
delphi xe2Descripción completa
This tutorial teaches how to use the Intel CPU assembler language in Delphi. It gives you also pro's and con's when to use and when not ti use it. Author: Guido Gybels.
delphi xe2
Simulating multicast events in Win32 Delphi In Win32 Delphi OOP, only one method can be assigned as a handler to a component's event. In Delphi for .Net, multiple event handlers can be bound to the same event. Here's a simulation of multicast events in Win32 Delphi. More of this Feature • Download Source Code
When you develop (Win32) applications using Delphi you almost always write the code to handle some component's event(s). For example, when you drop a
Join the Discussion "Post your views, comments, questions and doubts to this article." Discuss!
TButton on a form and double click it, an empty event handler is created where you write the code to react on the user click action. Win32 Delphi allows you to assign only one method as a
Related Resources • OOP in Delphi • Simulating class properties in Win32 Delphi • Language features in Delphi for .NET
handler to an event of a component. With Delphi for .NET a notion of multicast events was introduced. A developer can assign two or more methods to be called when an event gets fired. Let's see how to build a Win32 Delphi object that maintains a list of the methods its event(s) is handled by - thus creating a simulation of multicast event handling. Before we start, I strongly suggest that you freshen up your Delphi OOP and custom component development memory... A simple example of multicast event handling in Win32 Delphi First, we'll define a simple class (TMultiEventClass) with only one event of TMutliEvent type. In order to store a list of methods that will be called when event is fired (using the FireMultiEvent) we'll use a fMultiEventHandlers TList object. The TList Delphi class is designed to be used as a storage mechanism for an array of pointers. By design, each method (function or procedure) in Delphi code can be represented with a TMethod Delphi type. A TMethod type can be used, for example, to execute a method by its name.
type PMethod = ^TMethod;
TMutliEvent = procedure(const Value : string) of object;
TMultiEventClass = class private fMultiEventHandlers : TList; public constructor Create; destructor Destroy; override;