Recent

Author Topic: Form was not recompiled after a property has been changed in object inspector  (Read 3162 times)

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Another day an user asked me "Please, increase the maximum allowed value of this spin edit". Then I thought "Sure, lets increase it". Then I opened Lazarus 1.8.5 RC5 (in ubuntu 16.04 LTS), navigated to the form where the spin edit was and after changing its maximum value using the object inspector, I pressed "F9". But for my surprise nothing had changed. The maximum value was the same as before during run time, despite the fact that in design time it was not. Then I had a cow thought "Hummm..". After some trials and inquiring, I have noticed the option "Clean up an Build" and for some reason I had a different and intuitive thought this time "Lets try it". And it worked, now everything was right. But I want to know why! Would someone explain why this "runtime vs design time" difference occurred?
Be mindful and excellent with each other.
https://github.com/cpicanco/

taazz

  • Hero Member
  • *****
  • Posts: 5368
its called smart compiling. It suppose to recognise when a file has changed and recompile it only if it has changed it looks like they do not take in to account the changes in the lfm or the algorithm needs tweaking. Just add an empty line in the source editor save delete it and save again, that will probably trigger the recompilation. You can always enable the project option "always build (even if nothing changes)" under miscellaneous in the project options dialogue for a similar effect of clean and build.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Is it some sort of bug?
Be mindful and excellent with each other.
https://github.com/cpicanco/

taazz

  • Hero Member
  • *****
  • Posts: 5368
Is it some sort of bug?
I have no idea it has been seen from time to time but I haven't be able to create a repeatable test case to make sure. In most cases a simple restart of the IDE solves the problem for me which makes it impossible to reproduce it in a sample application and be certain that it will be surface it self on other installations.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Handoko

  • Hero Member
  • *****
  • Posts: 5158
  • My goal: build my own game engine using Lazarus
I cannot reproduce on Lazarus 1.8.0RC5 FPC 3.0.4 x86_64-linux-gtk2 on Ubuntu Mate 17.10.
01. Start a new project
02. Drop a TSpinEdit to the form
03. Run the project (and exit the program)
04. Modify the MaxValue using Object Inspector
05. Run the project again (without manually save them)
06. Everything works correctly

I have which I guess similar issue as cpicanco said but that only happens if I restore some (not all) files from backup. The program will sometimes become weird until I manually delete the lib folder and recompile.

 

TinyPortal © 2005-2018