Recent

Author Topic: How to add a new folder to the IDE component pallet  (Read 269 times)

Derz

  • New Member
  • *
  • Posts: 15
How to add a new folder to the IDE component pallet
« on: February 03, 2023, 12:03:22 am »
When I tried to add a new component to the IDE in code which worked with Delphi, I hosed my Lazarus installation.  It would not run, I had to reinstall.  The Line of code in causing the issue (no error in compiling or anywhere) was..

Code: Pascal  [Select][+][-]
  1. procedure Register;
  2. begin
  3.   RegisterComponents('MyComponents',[TMyStringGrid]);
  4. end;

I searched but could not find a means of adding a new "folder" to the IDE component pallet.  I assume there must be a way to add "MyComponents".


KodeZwerg

  • Hero Member
  • *****
  • Posts: 1195
  • Fifty shades of code.
    • Delphi & FreePascal
Re: How to add a new folder to the IDE component pallet
« Reply #1 on: February 03, 2023, 12:24:03 am »
In your shown code all is cool so error must be somewhere else.
Here is a small example of a full code, maybe you find in yours a difference.
Code: Pascal  [Select][+][-]
  1. unit MyComponent_register;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, MyComponentU;
  9.  
  10. procedure Register;
  11.  
  12. implementation
  13.  
  14. {$R mycomponent.dcr}
  15.  
  16. { Registration }
  17. procedure Register;
  18. begin
  19.   RegisterComponents('My Component', [TMyComponent]);
  20. end;
  21.  
  22. end.
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

Derz

  • New Member
  • *
  • Posts: 15
Re: How to add a new folder to the IDE component pallet
« Reply #2 on: February 03, 2023, 10:22:59 pm »
Seeing KodeZwerg's affirmation that the technique I used should work, I tried again, and it did work.  The I presume that during the IDE Rebuild, something went wrong due to a corrupt file or something.  The Lazarus reinstall must have fixed that. 

 

TinyPortal © 2005-2018