[Lazarus] nonlcl basic issue: is codetools LCL dependent?

Giuliano Colla giuliano.colla at fastwebnet.it
Sat Jun 21 12:43:17 CEST 2014


Hi Lazarus wizards and magicians,

I'm trying to figure how to face my nonlcl widgetset project.
Before tampering with Lazarus code, I tried to gain a better understanding.
My scenario:

  * a run-time package containing my non lcl widgets. Units are named
    after Kylix naming scheme, i.e. QForms, QButtons, etc.
  * a run-time package containing units lifted from Lazarus LCLBase and
    LazUtils to provide the required run-time functionalities without
    pulling in LCL (lresources, fileutils, etc.)

With a minimal patch to lresources, in order to skip properties pulled 
in by Lazarus and unsupported by my widgets, I can compile an 
application using my widgets, run and debug it.

If I try to access to a method already present in the lfm from the 
Object Inspector, I can see the available methods, and jump to the unit 
code.
But if I attempt to add something, such as an OnClick Event to a button 
from the Object Inspector, I get the error "Unable to create new 
method", and the reason given is:

Codetools, Errors:1
unit1.pas Error: unit not found StdCtrls

Of course my package doesn't have a StdCtrls unit, which would clash 
with Lazarus, but has a QStdCtrls unit.
Now my question is: where does Codetools find the need for a specific 
unit? I gather that class, property, etc. names are loaded into the 
global LazarusResources list, but this involves also unit names? In 
order to support a nonlcl widgetset to what extent one should reinvent 
Codetools in his Mediator?

Giuliano


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140621/8ada2a58/attachment-0002.html>


More information about the Lazarus mailing list