Describe the bug
When using the auto-save function of NumeRe the code execution for procedures starts while the file is still being reparsed. Therefore always the older code is executed.
To Reproduce
Steps to reproduce the behavior:
Generate a procedure with the following lines: a=3
Save the procedure
Change the value form 3 to 4, don't save the procedure change.
Execute the procedure with saving.
[BUG] See error (value will be old one and not the changed one)
When run again, the value is correct
Expected behavior
The file should be updated before being executed.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
all
Additional context
Add any other context about the problem here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
That's kind of simple, it only needs a call to m_terminal->UpdateLibrary() added to two locations in NumeReWindow.cpp:
The handler of ID_MENU_EXECUTE in void NumeReWindow::OnMenuEvent(wxCommandEvent &event), where it is checked, whether a file needs to be saved. Add here the mentioned call, if the saving process was successful and if the saved file is a NPRC, NLYT or NSCR file (use m_book->getCurrentEditor()->getFileType() to obtain this information).
Same for void NumeReWindow::EvaluateTab(). Add it to the similar check in this function.
DESCRIPTION
Describe the bug When using the auto-save function of NumeRe the code execution for procedures starts while the file is still being reparsed. Therefore always the older code is executed.
To Reproduce Steps to reproduce the behavior:
a=3
Expected behavior The file should be updated before being executed.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
That's kind of simple, it only needs a call to
m_terminal->UpdateLibrary()
added to two locations inNumeReWindow.cpp
:ID_MENU_EXECUTE
invoid NumeReWindow::OnMenuEvent(wxCommandEvent &event)
, where it is checked, whether a file needs to be saved. Add here the mentioned call, if the saving process was successful and if the saved file is a NPRC, NLYT or NSCR file (usem_book->getCurrentEditor()->getFileType()
to obtain this information).void NumeReWindow::EvaluateTab()
. Add it to the similar check in this function.IMPLEMENTATION STEPS
(see also our Wiki for implementation guidelines)
DOCUMENTATION STEPS
(see also our Wiki for further information)
*.NHLP
and*.NDB
files, if needed)*.NLNG
files, if needed)PULL REQUEST