Please excuse me for being dense. I'm not bad as an algorist but writing interfaces is not my strong point.
You know how you usually assign a variable to a window or gadget as in
x=createwindow or createsomethingorother
and these x can be used in the logical processing of the gadgets.
Well, in a programme which repeatedly creates and frees the same windows, and optionally gadgets within them, in arbitrary sequence all over the place, is it not a good idea to set these variables to zero at the time of freeing their corresponding gadgets ?
Blitz seems to keep a sort of continuously changing stack of gadgets which reuses the same pointers with different gadgets. I had written a programme of the above type and it took me ages to find what was going wrong and why my main event loop was detecting action in the wrong gadgets. Once I did the above trick everything seemed to work perfectly.
I haven't seen this specifically stated anywhere. Am I thinking correctly ?
You know how you usually assign a variable to a window or gadget as in
x=createwindow or createsomethingorother
and these x can be used in the logical processing of the gadgets.
Well, in a programme which repeatedly creates and frees the same windows, and optionally gadgets within them, in arbitrary sequence all over the place, is it not a good idea to set these variables to zero at the time of freeing their corresponding gadgets ?
Blitz seems to keep a sort of continuously changing stack of gadgets which reuses the same pointers with different gadgets. I had written a programme of the above type and it took me ages to find what was going wrong and why my main event loop was detecting action in the wrong gadgets. Once I did the above trick everything seemed to work perfectly.
I haven't seen this specifically stated anywhere. Am I thinking correctly ?