Show quoted text 11 lines
On 3/17/06, Gökhan Ersumer wrote:
> Yep, I said so (on last paragraph) but IMO this is
> bad for maintanence and/or component writers.
I wrote TTrayIcon component to implement multiplatform system tray and
also did a lot of things on the Qt interface for Lazarus, and also
started the Windows CE interface, and I had no idea about that vtm
thing until I read your e-mail.
So I can conclude that one can write components and even new
interfaces (and maintain them) without ever knowing about this.
That's exactly the idea of creating a vmt, instead of working with a fake: No extra code or headaches for the components, property editors, component editors, object inspector, ... .
The vmt is created only for the lookuproot (TForms/TDataModules). For example a TForm1. This is a class of its own, so it needs a vmt of its own. This way the class can be renamed and the classtype pointer can be used normally. A TTrayIcon put onto the form/datamodule does not get an extra vmt. When the IDE supports designing components, and you want to design a TTrayIcon descendent, then the IDE will create a TTrayIcon1 vmt.
See designer/jitforms.pp function CreateNewJITClass.
Mattias