Please enable JavaScript to view this site.

KOL/MCK - User Guide

Development of GUI applications in KOL: Mirror Classes Kit

 

If the mountain does not go to Mohammed,

then Mohammed will come to the mountain.

(Arabic proverb)

 

It is impossible not to dwell on a very important topic indicated in the title of this chapter. Delphi programmers, sitting in the IDE, have long been accustomed to the fact that a project using the VCL library (and now CLX - "kylix") is very convenient to develop visually, i.e. by sketching components on the form and visually setting their properties in the Object Inspector.

 

Of course, in the first versions, KOL was not visual (the library was conceived as not visual). But at some point the X hour came, and under the influence of numerous demands from KOL users, I was forced to develop a set of visual ("mirror") classes - Mirror Classes Kit - it is called that. What it is. It is a set of Design Time classes that are only used to determine which KOL objects are used in a module at run-time.

 

These mirror classes themselves are not involved in the program at runtime, and do not even exist, but at the development stage they are engaged in generating code for initializing forms, initializing and launching the application. And that's all. Those. MCK works like an add-on or plug-in to the Delphi IDE, modifying project files so that when they are processed into machine code, the Delphi compiler "does not see" mirror classes, links to .dfm form resources, but compiles only the code generated by MCK mirrors in the process of setting them up by the programmer.

 

In fact, application development in MCK - unlike "pure KOL" (this term appeared, apparently, by analogy with VCL - against "pure API") in no way increases the size of the application, just simplifying the developer's work (so the analogy - very distant).

 

In addition to what has already been said, I note that MCK projects, unlike handwritten KOL projects, automatically support Collapse and FormCompact technologies. The Collapse technique is that when the Pcode conditional compilation symbol is included in the project options, the mirror classes automatically generate the P-code for the Collapse machine, and thus it is possible to somewhat reduce the code of any large KOL applications using MCK. The FormCompact technique is even simpler: just enable the FormCompact property in the Object Inspector, and the generated pseudo-code for creating the form starts being processed by the interpreter of this pseudo-code, automatically. Reducing the code, however, will be noticeable (in both cases) only for the case of a sufficiently large number of controls on the form.

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC