Jump to content

limelect

Members
  • Content Count

    918
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by limelect

  1. limelect

    Some components show class =nil

    I guess you did not understand the situation. 1. I install a new component. 2. it is on the list 3. package full with component 4. Close program Delphi. 5. open Delphi. 6. rerun my program. 7. see component on a pallet 8. package empty
  2. limelect

    Some components show class =nil

    ---------dockingformpackage.bpl Empty no component INSIDE In my case, some installed packages show empty although they have components inside and that is the problem and this is the stament if PackageServices.GetComponentCount(PackageCounter) = 0 then
  3. limelect

    Some components show class =nil

    Use my last demo because the old one are not perfect You will get a list of similar txt This is an empty package ---------xxxxxx.bpl
  4. limelect

    Some components show class =nil

    Here it is my last demo to see how many packages are empty DockingForm (2).zip
  5. limelect

    Some components show class =nil

    @Kas Ob. I am too professional to leave this point. After installing and seeing the component I close the Delphi program and reopen. This is when the package is empty. P.S I have a new demo with a button to initialize. The problem is that restart Delphi the packages are empty. !!! If you want I can put here the source it is 2 more lines. See my last comment
  6. limelect

    Some components show class =nil

    I have created a text file of the components and there packeges. Where there is no component in the package see ---------zcontrols_d.bpl and more. if PackageServices.GetComponentCount(PackageCounter) = 0 then s.Add('---------'+PackageServices.PackageNames[PackageCounter]); But one can see in the component tab the components and also on the pallet So i am trying to investigate but i am almost at the end. tst.txt
  7. limelect

    Some components show class =nil

    @Mahdi Safsafi and others Well, I just installed a new component on my D10.2.3, and after closing the Delphi program and reopening it does not show on my list !!. Although it is on the pallet. So it is the Delphi program. !!!! So now for the questions 1. is there another way to get the component list? beside PackageServices := BorlandIDEServices as IOTAPackageServices; and for PackageCounter := 0 to PackageServices.PackageCount - 1 do 2. is there a max quantity for components? I have many. P.S @Mahdi Safsafi I just installed your ZControl and it too disappeared
  8. limelect

    Some components show class =nil

    Oh no not again . Restart Delphi stop showing in the list the component. I will manege.
  9. limelect

    Some components show class =nil

    OK to sum it . I do not understand the IDE. I recompiled and reinstaled the component and now it shows on the list. Even it was on the pallet it did not show. Not my fault. As for my first problem the @Mahdi Safsafi solution helped a lot. Thanks
  10. limelect

    Some components show class =nil

    Sorry for the bother but it mite be me Thanks for any help
  11. limelect

    Some components show class =nil

    I hop i do not bother someone but this buffels me https://github.com/digao-dalpiaz/Dam this is not on the list although it is on the pallet And if this is the case may be some other components too. procedure GetAllClass; // var Coreide: THandle; Delphicoreide: THandle; LGlobalPackagesPtr: Pointer; LDesignPackages: TDesignPackages; LIDEDesignPackage: TIDEDesignPackage; LRegModule: TRegModule; LRegClass: TRegClass; LIDEDesignPackageCount: Integer; LRegModuleCount: Integer; LIndex: Integer; I: Integer; J: Integer; PackageServices: IOTAPackageServices; PackageCounter: Integer; s: TStringList; begin s := TStringList.Create; // Result.Clear; PackageServices := BorlandIDEServices as IOTAPackageServices; Assert(Assigned(PackageServices)); { --- Move me outside --- } // adapt 260 suffix according to your Delphi version. Coreide := GetModuleHandle('coreide250.bpl'); Delphicoreide := GetModuleHandle('delphicoreide250.bpl'); LGlobalPackagesPtr := GetProcAddress(Coreide, '@Pakmgr@Packages'); DesignPackagesGetPackages := GetProcAddress(Coreide, '@Pakmgr@TDesignPackages@GetPackages$qqri'); IDEDesignPackageGetCount := GetProcAddress(Delphicoreide, '@Pascpppakmgr@TIDEDesignPackage@GetCount$qqrv'); IDEDesignPackageGetModules := GetProcAddress(Delphicoreide, '@Pascpppakmgr@TIDEDesignPackage@GetModules$qqri'); RegModuleGetCount := GetProcAddress(Coreide, '@Pakmgr@TRegModule@GetCount$qqrv'); RegModuleGetClasses := GetProcAddress(Coreide, '@Pakmgr@TRegModule@GetClasses$qqri'); Assert(Assigned(LGlobalPackagesPtr), 'LGlobalPackagesPtr not assigned'); Assert(Assigned(DesignPackagesGetPackages), 'DesignPackagesGetPackages not assigned'); Assert(Assigned(IDEDesignPackageGetCount), 'IDEDesignPackageGetCount not assigned'); Assert(Assigned(IDEDesignPackageGetModules), 'IDEDesignPackageGetModules not assigned'); Assert(Assigned(RegModuleGetCount), 'RegModuleGetCount not assigned'); Assert(Assigned(RegModuleGetClasses), 'RegModuleGetClasses not assigned'); { --- End Move outside --- } if Assigned(LGlobalPackagesPtr) then begin for PackageCounter := 0 to PackageServices.PackageCount - 1 do begin if PackageServices.GetComponentCount(PackageCounter) > 0 then begin LDesignPackages := TObject(PPointer(LGlobalPackagesPtr)^); LIDEDesignPackage := DesignPackagesGetPackages(LDesignPackages, PackageCounter); LIDEDesignPackageCount := IDEDesignPackageGetCount(LIDEDesignPackage); LIndex := 0; // Compeginonent Index. for I := 0 to LIDEDesignPackageCount - 1 do begin LRegModule := IDEDesignPackageGetModules(LIDEDesignPackage, I); LRegModuleCount := RegModuleGetCount(LRegModule); for J := 0 to LRegModuleCount - 1 do begin // if LIndex = ComponentIndex then begin LRegClass := RegModuleGetClasses(LRegModule, J); s.Add(TClass(PPointer(PByte(LRegClass) + 4)^).ClassName); // exit; end; Inc(LIndex); end; end; end; end; end; s.SaveToFile('c:\tst.txt'); s.Free; end; can some one install and help ? just add above to my test package and in Initilize just call GetAllClass;
  12. limelect

    Some components show class =nil

    @Mahdi Safsafi Just for general knowledge why there is a difference between the getting of the component from the toolbar and from the package. Since every component is going from a search through the bpl again and again which is time-consuming. I guess I can leave most of the initialization outside of GetClass2 but still a lot of iterations. So again why the difference? in nil In the package the class is different?
  13. limelect

    Some components show class =nil

    Thank i will try yours again
  14. limelect

    Some components show class =nil

    I have made a very simple DEMO reading from the component bar (it does not have to show) In the end, it saves components to a txt file. Very simple. See how many components are NIL !!!!! DockingForm (2).zip And that is my problem The same problem with Tool Pallet although there is a discrepancy between the two
  15. limelect

    Some components show class =nil

    I am preparing a very simple test
  16. limelect

    Some components show class =nil

    First I am using D10.2.3. All "Normal components are read" But try to install the above component and am i wrong? Further more try to do if xx<>nil then qqqqq.... else <<<< catch here and see I did catch by InstalledComponentName := PackageServices.ComponentNames[PackageCounter, ComponentCounter]; and lastly I xx := GetClass(InstalledComponentName); where xx: TPersistentClass; The class name is not the problem
  17. limelect

    Some components show class =nil

    @Mahdi Safsafi Well, not good news. I have used your suggestion it does not work in my case. Well, let me explain. I am using this guy component. https://github.com/digao-dalpiaz/Dam It worked great and I have no complaint BUT it represents a section of components that reading them from the IDE get nil for classes. They seem to register OK and show on the pallet and are usable. So that is the problem. in your case, I used TPersistentClass(LClass); like that. Maybe this is the problem.? Since I have to use TPersistentClass as I am taking an old program and making it an EXPERT. So the question is if TPersistentClass is the problem as I am using GetClass or your Lclass. Any idea? Maybe I can tackle my problem differently. at the end I use this RegisterClasses(MyArray); where MyArray is TPersistentClass. This is why the above Hold my question something fishy Ok I return to my basic question 1. Reading from component toolbar NO DAM 2. Reading from tool pallet YES DAM in this case still DAM shows nil !!! DAM can be used from both Crazy IDE ????
  18. I have an expert with form TForm1 = class(TDockableForm) I drag the form to the left and pin it. Now I have a tab of my expert shown on the left. When I close the project the tab disappear even saving the desktop does not help. Do I need to add something on my software? Using D10.2.3
  19. @DanielIt took a while to investigate. I downloaded the demo Docking form It has all as per your suggestion. However When I dock the form it works. While the IDE is open it works. Changing a project it works. BUT closing Delphi d10.2.3 and reopening it did not save the position (it wasn't docked any more) and I had to redock. Saving the desktop did not help. Is it suppose to be like that? Any suggestion? DockingForm.zip Well docking to the right mite work. To the left NO. Docking to the left and reopening Delphi it docks to the right. Funny Delphi IDE it docks to the right this is why I thought it dose not work. I had to dock twice. dock close dock. Now it works on the left too. Very unreliable.
  20. @Uwe Raabe It mite work thanks xx:TPersistentClass; xx:=GetClass(PackageServices.ComponentNames[PackageCounter, ComponentCounter]);
  21. @Uwe Raabe You are correct but information of components are in package > PackageServices PackageServices := BorlandIDEServices as IOTAPackageServices; Unless there is another way to get the component >TPersistentClass; in the package
  22. limelect

    MiTeC DFM Editor 8.0.0

    @Bill Meyer Nice idea. I guess you made the dll in D6 and used it with D2006. Great.
  23. limelect

    MiTeC DFM Editor 8.0.0

    @Fr0sT.Brutal You never used someone else source? You got a binary dfm in it a component you do not have but is a derivative of memo. You want to rename it. Easy. Just use the binary as text rename the component and then in pas you rename it too. Easy now you can compile the form. Otherwise no compilation. P.S leave out properties that you cannot use.
  24. limelect

    MiTeC DFM Editor 8.0.0

    @Fr0sT.Brutal This is a BPL taken from D10.2.3 which has a lot of forms inside Translate to PAS and use it.
×