Recent

Author Topic: How do you change a package icon once set?  (Read 6288 times)

wp

  • Hero Member
  • *****
  • Posts: 13361
Re: How do you change a package icon once set?
« Reply #30 on: July 22, 2025, 09:12:29 am »
I just went and broke my IDE for the umpteenth time :o
Yes, writing an IDE extension is very very demanding. If possible accomplish your idea as a stand-alone application first which you can test outside the IDE (this, however, is demanding as well because many data are available only from inside the IDE) and call it from the IDE extension.

Aruna

  • Hero Member
  • *****
  • Posts: 787
Re: How do you change a package icon once set?
« Reply #31 on: July 25, 2025, 04:02:07 am »
Of course, functions like ShowAddToPackageDlg are created simply to reduce code duplication. The form can be created and called directly in the button event.
As far as I can see, the "extra" ShowNewCompDialog method in this chain is created here because it is called from another unit too.
Yes your right the form can be created and called directly in the button event. I tried this and managed to get a test form to work.This is ok for my initial learning but I I truly want to *understand* how things are done in the IDE and why? I managed to locate the form as the screenshot shows but I have no clue how or why it works yet. And I do not want to deviate too much from what everyone else has done. So for now creating the form directly works and is fine but I need to clearly understand how AddToPackageDlg.pas does it's voo-doo magic :(

I recommend always studying the places where variables/methods are used by searching in files [Ctrl+Shift+F]. Such a simple text search gives a lot of unnecessary results (since it does not take into account the visibility of variables), but it usually helps a lot.
Thank you n7800 I tried this and yes it helps a lot.

Aruna

  • Hero Member
  • *****
  • Posts: 787
Re: How do you change a package icon once set?
« Reply #32 on: July 25, 2025, 04:05:54 am »
I just went and broke my IDE for the umpteenth time :o
Yes, writing an IDE extension is very very demanding. If possible accomplish your idea as a stand-alone application first which you can test outside the IDE (this, however, is demanding as well because many data are available only from inside the IDE) and call it from the IDE extension.
Yes I am beginning to realize this is no easy task I have set upon. wp, how do I trigger the IDE re-build through my code? You know on the main menu under:Tools-->Build Lazarus With Profile: Normal IDE, how do I do this through code??
« Last Edit: July 25, 2025, 04:17:47 am by Aruna »

 

TinyPortal © 2005-2018