Package - code documentation lazarus / 31-LCL ---------------------------------------------------------------------- J-23 · 2020-04-12 18:28 Hello, In the editor of his own component, he needs access to the 'component palette' installed in Lazarus. I tried to get this palette out of the code, but it is related to many things in the IDE. So I have two options: 1. Has anyone a component that can retrieve information about installed packages / components? 2. Is there any additional documentation about how the packages work? - So that you can write such a palette as a component. (Is all I need to do is code analysis?) ---------------------------------------------------------------------- howardpc · 2020-04-12 18:49 The IDE has an entire menu devoted to packages. The Open xxx menu items open a loaded, or recent or specifically- browsed-for package in the package editor, which gives you access to information about the package, as well as ability to edit aspects of the package. The Package Graph... and Package Links... items give you access to tons of information about all the packages the IDE knows about, and their inter-relationships and inter-dependencies. The New Component... item is a wizard-style series of dialogs which walks you through the process of creating and registering a new component (and perhaps a new component editor, if needed). Components are registered in the component palette using the Register call which must contain one or more calls to RegisterComponents(). This procedure takes two parameters, a string specifying the page in the component palette where the component will be placed (it can be a new page, or an existing page), and an array of component classes containing the classes to be registered (the array may contain one or more classes). ---------------------------------------------------------------------- Martin_fr · 2020-04-12 19:32 I do not know if there is, but you would have to search the package IdeIntf. That is, how 3rd party package can access some parts of the IDE. ---------------------------------------------------------------------- J-23 · 2020-04-13 23:48 Quote from: Martin_fr on April 12, 2020, 09:32:35 pmI do not know if there is, but you would have to search the package IdeIntf. Yes i know I wonder how to enter Lazarus Debug code - step by step. To know how the procedure works: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i PkgBoss.LoadInstalledPackages; The procedure is located on the line: 1590 unit: "Main.pp" ---------------------------------------------------------------------- Martin_fr · 2020-04-14 00:01 Quote from: J-23 on April 14, 2020, 01:48:31 amI wonder how to enter Lazarus Debug code - step by step. Do you mean: How to debug the Lazarus IDE itself. - Compile from menu: Tools -> Configure Build Lazarus   It the "Custom Options" enter: -gw -godwarfsets   Press "build" - Open project: ide/lazarus.lpi - Set breakpoints - Run with F9 If you change the code, you must build from Tools menu again. ---------------------------------------------------------------------- J-23 · 2020-04-14 19:26 Quote from: Martin_fr on April 14, 2020, 02:01:49 amQuote from: J-23 on April 14, 2020, 01:48:31 amI wonder how to enter Lazarus Debug code - step by step. Do you mean: How to debug the Lazarus IDE itself. - Compile from menu: Tools -> Configure Build Lazarus   It the "Custom Options" enter: -gw -godwarfsets   Press "build" - Open project: ide/lazarus.lpi - Set breakpoints - Run with F9 If you change the code, you must build from Tools menu again. Works ---------------------------------------------------------------------- J-23 · 2020-04-14 20:00 Hello, Everything is based on the list: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i RegisteredPackages which is declared like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i RegisteredPackages: TFPList; // list of PRegisteredPackage which is created in the Lazarus compilation process and then read in function: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TPkgManager.LoadStaticCustomPackages;var  StaticPackages: TFPList;  StaticPackage: PRegisteredPackage;  i: Integer;  APackage: TLazPackage;  Quiet: Boolean;begin  StaticPackages:=LazarusPackageIntf.RegisteredPackages;  if StaticPackages=nil then exit;  Quiet:=false;   // register IDE's FCL components   // register components in Lazarus packages  for i:=0 to StaticPackages.Count-1 do begin    StaticPackage:=PRegisteredPackage(StaticPackages[i]);    //debugln(['TPkgManager.LoadStaticCustomPackages ',StaticPackage^.Name]);     // check package name    if not IsValidPkgName(StaticPackage^.Name)    then begin      DebugLn('Warning: (lazarus) [TPkgManager.LoadStaticCustomPackages] Invalid Package Name: "',        BinaryStrToText(StaticPackage^.Name),'"');      continue;    end;      // check RegisterFCLBaseComponents procedure    if (StaticPackage^.RegisterProc=nil) then begin      DebugLn('Warning: (lazarus) [TPkgManager.LoadStaticCustomPackages]',        ' Package "',StaticPackage^.Name,'" has no register procedure.');      continue;    end;        // load package    APackage:=LoadInstalledPac kage(StaticPackage^.Name,KeepInstalledPackages,                                 Quiet);     PackageGraph.RegisterStaticPackage(APackage,Sta ticPackage^.RegisterProc);  end;  PackageGraph.SortAutoInstallDependencies;  ClearRegisteredPackages;end;  I did not find any external configuration files with information about installed packages (I was hoping for that ) This information would help me build the component palette as a component for use in the IDE. I have two solutions: 1. Interference with the Lazarus code (Which is not my goal) 2. Read the used memory address of the list so as to access its contents What do you think about idea 2?