* * *

Author Topic: [SOLVED] Changes in one project influences another project  (Read 2383 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4323
    • wiki
Re: Changes in one project influences another project
« Reply #15 on: March 19, 2017, 12:13:51 am »
Rereading your post:
Quote
After I add some unit in Code edit window of laz1.lpi then close laz1.lpi and open laz2.lpi,  this unit will appear in code edit window of laz2.lpi too. Same with delete some unit from laz1.lpi or from laz2.lpi.
Is this about units OPEN in the EDITOR window?

Because that differs from "ADDED to PROJECT".

Did you actually test, if the IDE modifies the lpi in the "other" directory?

- Backup both lpi
- work on one project
- save and close.
- use a diff tool to see if the other lpi was modified.

------------------------
The windows open in the editor, are stored in the session (and you can open files, that do NOT belong to the project, yet will be remembered).

The session can be stored either:
- as part of the lpi
- as lps file in the project folder
- as lps file in the global lazarus conf dir (primary config path)

And in the last case, if both projects have the same name, that will mean they share a session.

Go to menu: Project > Project Options
then page: Project Options > Session
And it will show where your session goes.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4323
    • wiki
Re: Changes in one project influences another project
« Reply #16 on: March 19, 2017, 12:16:37 am »
Off topic / but about copying projects
Most of the time coping the folder will work.
A better way to get a clean copy, is using "Publish project" from the menu.

Handoko

  • Hero Member
  • *****
  • Posts: 1404
  • My goal: build my own game engine using Lazarus
Re: Changes in one project influences another project
« Reply #17 on: March 19, 2017, 02:57:36 am »
Something that yurkat said interest me:

Quote
The real names of  laz1.lpi and  laz2.lpi are the same.

That makes me think of an issue that I ever made. I ever copied/pasted a project and renamed the copied project file (.lpi) manually (all those things done using file manager). Then weird things happened. Lesson learned, so if I want to duplicate project to a new name, now I always use:

Lazarus main menu > Project > Save Project As

I guess yurkad's issue is the same as the thing I did.

yurkad

  • Full Member
  • ***
  • Posts: 107
Re: Changes in one project influences another project
« Reply #18 on: March 19, 2017, 10:47:25 pm »
Martin_fr, thanks!

Quote
Is this about units OPEN in the EDITOR window?
Yes, it is

Quote
Because that differs from "ADDED to PROJECT".
Yes, it is thus.

Quote
Did you actually test, if the IDE modifies the lpi in the "other" directory?
I did not understand this.

Quote
- Backup both lpi
- work on one project
- save and close.
- use a diff tool to see if the other lpi was modified.
Sorry, but I cannot make this already. According of advice of JuhaManninen I made new project, which is working correctly and then I deleted both folders.

Quote
The windows open in the editor, are stored in the session (and you can open files, that do NOT belong to the project, yet will be remembered).

The session can be stored either:
- as part of the lpi
- as lps file in the project folder
- as lps file in the global lazarus conf dir (primary config path)

And in the last case, if both projects have the same name, that will mean they share a session.
It is very useful information.
I deleted  lps file in the project folder. By this my case is:
Quote
lps file in the global lazarus conf dir (primary config path)
Unfortunately I did not know about the existence of this file in the global lazarus conf dir.
So the cause of this problem was that both projects share a session thru lps file in the global lazarus conf dir.
Thank you again, Martin_fr. The problem is solved!

Quote
Go to menu: Project > Project Options
then page: Project Options > Session
And it will show where your session goes.
I acknowledge that the real cause of this problem was my irresponsibility for using Lazarus. I should have studied so many things before, how to use it correctly! Including about session.

Quote
Off topic / but about copying projects
Most of the time coping the folder will work.
A better way to get a clean copy, is using "Publish project" from the menu.
This is the key advice to duplicate project in Lazarus. Many thanks!

yurkad

  • Full Member
  • ***
  • Posts: 107
Re: Changes in one project influences another project
« Reply #19 on: March 19, 2017, 10:58:26 pm »
Thank you, Handoko.

I hope that my previous post can be answer for you also.

yurkad

  • Full Member
  • ***
  • Posts: 107
Re: Changes in one project influences another project
« Reply #20 on: March 19, 2017, 11:08:14 pm »
The problem definirively is solved.

I apologize to all who wrote in this page and to all who read it.
You lost so much time just because I did not fulfill an obvious rule:
Before using a thing you have to study the rules of how to use it correctly.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus