Skip to content

invalid string durin HESSI GUI mouseclick #1685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GillesDuvert opened this issue Dec 13, 2023 · 3 comments
Closed

invalid string durin HESSI GUI mouseclick #1685

GillesDuvert opened this issue Dec 13, 2023 · 3 comments

Comments

@GillesDuvert
Copy link
Contributor

when right-clicking on the plot, plots the date/position once, then runs in an infinite loop saying "Unknown user value in plotman =" ---> obviously a bug in the gdlwidget's code.
idem when left-clicking (should open a zoom rectangle), same error.

@GillesDuvert
Copy link
Contributor Author

closed by #1694
excellent bugfind

@GillesDuvert
Copy link
Contributor Author

actually #1694 did not do a good job and was the source of #1710.
Apparently in the case of PLOTMAN, the behaviour of the WIDGET_EVENT loop does not seem to follow the documentation: the event returned by the function is not checked against the hierachy (which is the norm and permits the "rewriting" of events that is the basis of the compound widgets ) but returned immediately. The patch soon proposed will just return if the "modified" event is the same as the event before handling by the function, and it suffices for PLOTMAN. Of course this is far from satisfactory, but as the eventloop of GDL is clearly not the same algorithm as in IDL, especially with the WxWidgets in the middle, this is a point to follow, there may be other cases where a special treatment is needed.

test_widgets has now this "test" in the first panel of the "DRAW" tab.

@GillesDuvert
Copy link
Contributor Author

All above comments proved false , culprit was a wrong WIDGET_EVENT code.

GillesDuvert added a commit to GillesDuvert/gdl that referenced this issue Sep 7, 2024
…when needed, and found that WIDGET_EVENT was returning events AFTER event processing, not before. This was the sole reason of gnudatalanguage#1685. Thus removed the unnecessary (and wrong) patch made in 1716

HANDLER is now 0 in all structures created by widgets events, to be updated eventually by user event_pro or event_func.

wxLoop is called way more frequently than before, at times when it is needed,  widgets shoudl be  more reactive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant