Recent

Author Topic: New wiki guide on how to write components for Lazarus  (Read 5677 times)

tpglemur

  • New Member
  • *
  • Posts: 13
New wiki guide on how to write components for Lazarus
« on: September 30, 2008, 09:27:07 pm »
After spending quite some time on figuring how to write components for Lazarus, I decided to spare others similar hardship by putting everything down in one page. Hope someone finds it useful

http://wiki.lazarus.freepascal.org/How_To_Write_Lazarus_Component

Feedback appreciated.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
RE: New wiki guide on how to write components for Lazarus
« Reply #1 on: October 01, 2008, 05:21:29 pm »
Thank you! :)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Derz

  • New Member
  • *
  • Posts: 21
Re: New wiki guide on how to write components for Lazarus
« Reply #2 on: March 29, 2023, 10:02:12 pm »
I assume something may have changed in the years since you wrote "How to Write a Lazarus Component".  The same "missing step" in your instructions is also missing in other online tutorials on how to do this. Perhaps you can update your page?

In step step 2, after "creating your new component", you need to add a New Requirement and include "LCL Base".
If you do not do this, the uses clause for the new unit will be missing several base units (LResources, Forms, Controls, Graphics, Dialogs, StdCtrls), and you cannot simply edit the .pas file to add them.  If you try that you will bet compiler errors..
  Fatal: Cannot find "unit_X" used by "MyNewComonent".  Check if package LCLBase is in the dependencies of package "MyNewPackage"

You can make simple extensions to existing components without LCLBase, but your example will not work.

Thank you for providing the original WIKI!  I am sure it is very popular.
(

 

TinyPortal © 2005-2018