Recent

Author Topic: How can I add uses automatically?  (Read 2252 times)

loaded

  • Sr. Member
  • ****
  • Posts: 440
How can I add uses automatically?
« on: August 18, 2021, 02:07:26 pm »
Hi All,
In the example code below, I know the relevant definitions and can run the code by manually typing in the uses section.
Code: Pascal  [Select][+][-]
  1. var
  2.   ExchangeStream: IStream; // add manuel uses types
  3.   FPngstream: TOleStream;  //add manuel uses comobj

Code: Pascal  [Select][+][-]
  1. URLOpenBlockingStream
If I didn't know that the definition related to is registered in the urlmon, is there a way I can automatically add the relevant uses ?
If Ide=Lazarus 2.0.10 32 Bit and Os=Win 10 Home 64 Bit then Get up and do something useful! Because God is the helper of those who start again;

GetMem

  • Hero Member
  • *****
  • Posts: 3640
Re: How can I add uses automatically?
« Reply #1 on: August 18, 2021, 02:26:09 pm »
Hi loaded,

Did you try Cody: https://wiki.freepascal.org/Cody? Especially the "Unit/Identifier Dictionary": https://wiki.freepascal.org/Cody#Unit_.2F_Identifier_Dictionary.

loaded

  • Sr. Member
  • ****
  • Posts: 440
Re: How can I add uses automatically?
« Reply #2 on: August 18, 2021, 07:11:59 pm »
Thank you very much GetMem for your reply.
Firstly I was expecting a shorter path like F1 or F3.
I didn't know about Cody, good to know. We're going to do some experimenting now.
If Ide=Lazarus 2.0.10 32 Bit and Os=Win 10 Home 64 Bit then Get up and do something useful! Because God is the helper of those who start again;

 

TinyPortal © 2005-2018