Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-03

Lazarus

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

G�khan Ersumer
Show quoted text 5 lines
Message: 5 Date: Thu, 16 Mar 2006 18:15:45 -0300 From: "Felipe Monteiro de Carvalho" >On 3/16/06, Gökhan Ersumer
> Yep I meant creating VMT at runtime,It does not

seems

Show quoted text 5 lines
> like a good practice to me. Where is the code that creates VMT at runtime? Just curiosity, because I've being working with Lazarus, but I never noticed

it.

I've looked this a few years ago,and have no time to dig into Lazarus source again, sorry.

It probably doesn't matter from a user point of view.

Yep, I said so (on last paragraph) but IMO this is bad for maintanence and/or component writers.

thanks, -- Felipe Monteiro de Carvalho

__________________________________________________ Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Reply by email

Felipe Monteiro de Carvalho
to G�khan Ersumer
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.

Felipe Monteiro de Carvalho

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho
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

Reply by email