You are here: More Information > FAQ
Special Tasks
Technical Reference
> Parsing
Parsing
Comment Parsing
Output
Special Tasks
> How do I make properties show up as events?
Close
Doc-O-Matic 10
How do I make properties show up as events?

Doc-O-Matic automatically displays properties as events if the event type is known to Doc-O-Matic. The event type (function pointer type) can be defined anywhere in the project. 

In the following example the property is defined using an event type that is known to Doc-O-Matic. Thus the property is shown as event in the output documentation. 

C++ example:

typedef void __fastcall (__closure *TMessageEvent)(TObject *Sender, char *msg); //--------------------------------------------------------------------------- class PACKAGE TMessageReceiver { private: TMessageEventNotifyEvent FOnMessage; // Event handler protected: public: __published: __property TMessageEvent OnMessage = {read=FOnMessage, write=FOnMessage}; };

You can add a separate header file to your Doc-O-Matic project so that you do not have to define events in your source code. In this case, you can learn Doc-O-Matic event types that the compiler does not identify. 

In the support subdirectory in the Doc-O-Matic directory you can find the file eventtypes.pas. This file includes all event types declared in the VCL. Users of C++ can also add this file to their project and "convert" the properties in their project to events. You must not export these events otherwise they are included in your documentation.

Copyright © 2000-2020 toolsfactory software inc. All rights reserved.