[lazarus] CVS Changes

Shane Miller SMiller1 at stvgb.org
Mon Jan 29 09:41:14 EST 2001

OK  I've looked at the project code and it's a good start.  I have a few questions so I can help integrating it into the mianide.


1)  I assume there will be a TProjectUnitInfo class for each unit, including the project file.  If so, should the TProjectUnitInfo class hold a reference to a TStringList for the source or not?  See, if the AddUnit function is going to change the Project file then you will need to hold the source somewhere.  You can't be sure that it's ever been saved so the filename property could be blank.  This would mena that you would need to either have a reference to a stream or a TStringlist that holds the source.

2)  If we have the projectUnitInfo class hold the source, is it going to do the actual loading of the source or should the OpenProjectClicked load the details of the project, then run through all the units in and add them to the editor if they are visible.
  I would guess that MainIDE would call the Project class to load the project.  Then it would run through the UnitList and see how many should be displayed in the editor.  While doing that it could fill in a variable in the Project class that holds each source file.  If the file's loaded into an editor, then the project's TSitrngList would point to the editor's.  That way when the editor's changes the one in TProjectUnitInfo would too.

3) Should there be a TProject.Loaded function to see if a project is loaded or should I be looking at TProject.ProjectFile to see if it's <> ''?

4)  How are we going to handle opening multiple projects?  :-)

If I can figure out who's going to be responsible for loading the source and how TProject is going to modify it then I can integrate it with TSourceNotebook.


>>> cwhite at aracnet.com 01/29/01 01:05AM >>>

- Created the TProject class.
- Created a TProjectUnitInfo class to store project information specific
to each
- Moved Project Options and Compiler Options menus to the Project menu.
- Added Project property to the TMainIDE class to allow other units to
access the
Project information. Maybe this variable should be moved to the Globals
unit. I
still need to think more about that.

Note, the TProject class is not all connected to the IDE yet. But it
does all
compile OK now. Also, since the compiler options were moved to the
project file, it
no longer works until the project options are being saved and restored.

TODO still:
- All TODO's commented in the Project.pp file.
- Create a new .lpr file from a template (select template from dialog as
in Delphi)
and a new project when New Project menu item is selected.
- Add ability to add units to the main project file (.lpr). This needs a
- Add ability to remove units from the main project file. This needs a
- Add functionality for Open Project menu item.
- Add functionality for Project Save and Project Save As menu items.
- Create Project Options dialog.


     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus

More information about the Lazarus mailing list