I am confused about the use of AddExec in compiled code.
In a gui a TMarker is drawn on the Canvas, it’s y coordinate is shown in a TGTextEntry. Changing the entry will change the position of the TMarker.
However, I am trying to implement that you can also drag and drop the marker to a new position directly on the canvas. This is then supposed to update the member variables for the coordinates, and write the new value for y into the TextEntry field.
However, everytime I assign a new value to a member variable (y in that case) from within the Event member function (“MarkerClicked” in my example) I receive a segfault.
As long as I only output the new position as a new local variable everything is fine.
How to use AddExec properly in this context?
Cheers,
Maurits
I attach a minimal version of my working code. The dubious line(s) are commented out.
guiLinkDef.h (36 Bytes)
all.txt (135 Bytes)
MyMain.cxx (1.83 KB)
MyMain.h (702 Bytes)
main.cxx (245 Bytes)