1 страниц (4 вхождений)
Question about RequestEvaluation() method for custom region canvas - Сообщения
#1 Опубликовано: 11.08.2023 13:54:39
Hello everyone,
I have a question about updating the custom region canvas. Currently the image generation and processing for Insert > Draw2D / Draw3D in Maxima plugin inherit the RegionHolder class such that:
Currently the image in the region/canvas update itself based on the OnEvaluation method, as shown in the image below. The important part here is the canv.Plot() as new image is generated and processed through this function. Now I have a windows form which has the access to this MaximaPluginRegion class and want to update the canvas by making the evaluation when the user click on a button or action is made. However when using the RequestEvaluation() and Invalidate() methods, nothing happened. Any idea on how the RequestEvaluation() actually works or how can I make the evaluation? I have tried to call the canv.Plot() directly when user click the button, however this will cause the GUI to stuck because the main thread is still in use to do some process and the GUI cannot update itself.

Thank you in advance.
Best regards,
Faiz
I have a question about updating the custom region canvas. Currently the image generation and processing for Insert > Draw2D / Draw3D in Maxima plugin inherit the RegionHolder
public class MaximaPluginRegion : RegionHolder<MaximaPluginCanvas> {}
Currently the image in the region/canvas update itself based on the OnEvaluation method, as shown in the image below. The important part here is the canv.Plot() as new image is generated and processed through this function. Now I have a windows form which has the access to this MaximaPluginRegion class and want to update the canvas by making the evaluation when the user click on a button or action is made. However when using the RequestEvaluation() and Invalidate() methods, nothing happened. Any idea on how the RequestEvaluation() actually works or how can I make the evaluation? I have tried to call the canv.Plot() directly when user click the button, however this will cause the GUI to stuck because the main thread is still in use to do some process and the GUI cannot update itself.
Thank you in advance.
Best regards,
Faiz
#2 Опубликовано: 11.08.2023 14:12:28
Try turning on Autocalculate in the main menu.
Russia ☭ forever, Viacheslav N. Mezentsev
#3 Опубликовано: 11.08.2023 14:15:58
WroteTry turning on Autocalculate in the main menu.
I did and nothing happened when the RequestEvaluation is called. Does calling the RequestEvaluation will call again the method OnEvaluation or is it calling something else?
1 страниц (4 вхождений)
-
Новые сообщения
-
Нет новых сообщений