[Gambas-user] [Gambas Bug Tracker] Bug #708: Commented code is being run
bugtracker at ...3416...
bugtracker at ...3416...
Thu Sep 10 01:48:33 CEST 2015
http://gambaswiki.org/bugtracker/edit?object=BUG.708&from=L21haW4-
Comment #29 by Jussi LAHTINEN:
Bit more information about this...
Bug happens (with "format on load & save" enabled) following way:
1. Open the project.
2. Add ' at the beginning of some line. IE comment it out.
This marks the file being modified.
3. Save the project.
This causes following code to be run from FEditor.class, function Save:
...
If Settings["/FormatCode/FormatOnLoad"] Then
MPrettyCode.Run(edtEditor)
$bSkipChangeEvent = True
Endif
...
4. Remove the ', placed on step 2.
This causes event Editors_Change() to be triggered, but still $bSkipChangeEvent = True!
If $bSkipChangeEvent Then
$bSkipChangeEvent = False
Else
Modify
Endif
So, sub Modify is never executed. I think Editors_Change() should be called once more, but for some reason that doesn't happen when "prettyfying" the code.
I hope this helps... I will look more tomorrow.
More information about the User
mailing list