Recent

Author Topic: Vesion 2.2.2. - "not saved unit" shall not be part of the uses  (Read 344 times)

Nicole

  • Sr. Member
  • ****
  • Posts: 497
Is this my fault or a small issue of the IDE?

- hit the icon new unit and "unit 1" is created
- write something, what do do not enjoy after a while
- close the unit1 and chose "do not save"
- start the project
- read the error message "unit 1 not found"

=> it would be great, if the not-wanted unit1 would be deleted again from the uses list at the click "no, I do not want to save it".

rvk

  • Hero Member
  • *****
  • Posts: 5017
Re: Vesion 2.2.2. - "not saved unit" shall not be part of the uses
« Reply #1 on: August 25, 2022, 11:03:08 am »
=> it would be great, if the not-wanted unit1 would be deleted again from the uses list at the click "no, I do not want to save it".
Yes, that would be ideal but it's a bit tricky. It would mean rollback of source code but that can give troubles.
For instance, if you add Unit1 and Unit2 and save Unit2 but don't save Unit1.
The source of .lpr is already adjusted for Unit1 and Unit2.

If you delete the unit via the Project Inspector it does update the .lpr correctly.
So the logic-code is there, but Lazarus would need to detect the unit was not actually there before and remove it on non-save.

It doesn't happen often (I guess). But if it bothers you, you could put in a bug-report or feature request.
And no... it's not your fault  ;)

 

TinyPortal © 2005-2018