Recent

Author Topic: Doubts about Lazarus IDE by a beginner coming from Delphi 7  (Read 490 times)

Javier_43

  • New member
  • *
  • Posts: 7
Doubts about Lazarus IDE by a beginner coming from Delphi 7
« on: February 13, 2025, 08:08:34 pm »

Hello, I am a beginner in Lazarus, although with some experience in Delphi 7. In D7 in the Project menu there was an item View Source. Where is the equivalent in Lazarus?
In my Project I have added two units using an OpenDialog. The units appear in the Project Inspector. But they don't appear in the Uses section of the main unit. Have I made a mistake? 
Thank you

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10925
  • Debugger - SynEdit - and more
    • wiki
Re: Doubts about Lazarus IDE by a beginner coming from Delphi 7
« Reply #1 on: February 13, 2025, 08:20:53 pm »
In D7 in the Project menu there was an item View Source. Where is the equivalent in Lazarus?
Last (Bottom most) entry in the "Project" menu of the Lazarus IDE? "View Project Source"

If you mean, to open the automatically generated source for your GUI "application project". The one that creates the form and call Application.Run.

Quote
In my Project I have added two units using an OpenDialog. The units appear in the Project Inspector. But they don't appear in the Uses section of the main unit. Have I made a mistake? 

1) You mean pre-existing sources (units) that you already had on disk?
1a) via menu File > Open (aka OpenDialog).
1b) via "Project inspector" Toolbar button: ADD
2) Or You mean you created 2 new units, and to each of them added a TOpenDialog component?

And "main unit" => is the lpr, the unit that you open with the above mentioned  "View Project Source"?
Or the "unit1" with your main form.

If 1a) I am not sure, and haven't tested it. I don't think they should be added.
   Because that menu can be used to just open the file in the editor (e.g. to open a file from another project, to look something up)
if 1b) I would expect them to be added (and if needed the IDE to ask if to add the PATH to the settings)
If 2) Those should probably be added, afaik



marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12120
  • FPC developer.
Re: Doubts about Lazarus IDE by a beginner coming from Delphi 7
« Reply #2 on: February 13, 2025, 08:26:36 pm »
D7 is too long ago for me, but  viewing the project source is in the "Project" menu, last item, "View Project Source". Alternately, you can simply select the .lpr main program source in the project inspector.


If the problem is toggle between form and source view, press F12, or the first option in the "view" menu,  toggle "form/unit view"

Javier_43

  • New member
  • *
  • Posts: 7
Re: Doubts about Lazarus IDE by a beginner coming from Delphi 7
« Reply #3 on: February 15, 2025, 08:06:15 pm »
Thank you very much, Martin_fr and Marcov, for your kind answers, which have solved a problem. And I apologize for not having realized that in the Project menu I was, in the end, View Source.

 

TinyPortal © 2005-2018