Recent

Author Topic: How to use the LazarusIDE.ActiveProject.AddPackageDependency function?  (Read 335 times)

fcb

  • Newbie
  • Posts: 4
I'm developing a component that has a certain property, and when changing the value of this property the component would have to add a new package dependency to the project.
I was able to do this using LazarusIDE.ActiveProject.AddPackageDependency(<package>), but the same is added to the broken project, see the attachment when added the LCLBase package

Thanks

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4565
  • I like bugs.
Re: How to use the LazarusIDE.ActiveProject.AddPackageDependency function?
« Reply #1 on: February 15, 2025, 07:41:56 pm »
I was able to do this using LazarusIDE.ActiveProject.AddPackageDependency(<package>), but the same is added to the broken project, see the attachment when added the LCLBase package
Is the project broken? Can you build it? What if you close and open it again?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

fcb

  • Newbie
  • Posts: 4
Re: How to use the LazarusIDE.ActiveProject.AddPackageDependency function?
« Reply #2 on: February 17, 2025, 04:54:00 am »
I was able to do this using LazarusIDE.ActiveProject.AddPackageDependency(<package>), but the same is added to the broken project, see the attachment when added the LCLBase package
Is the project broken? Can you build it? What if you close and open it again?

The project is not broken, but when I compile it it warns that the dependency is broken.
If I close and open the project again, the dependency will no longer be broken and everything compiles normally

 

TinyPortal © 2005-2018