Author |
Topic: Create a Tooltip for a Control (Read 853 times) |
|
rtr
Guest
|
 |
Re: Create a Tooltip for a Control
« Reply #4 on: May 31st, 2014, 1:30pm » |
|
on May 31st, 2014, 12:57pm, g3nrw wrote:| I wonder if you have seen anything like this before. |
|
Yes, it's common. The most likely cause is that you have forgotten to close the dialogue box (PROC_closedialog) before you exit your program. It's essential that your program has both ON ERROR and ON CLOSE statements to ensure that happens; typically they will call a routine which takes care of all such 'cleanup' operations:
Code: ON CLOSE PROCcleanup : QUIT
ON ERROR SYS "MessageBox", @hwnd%, REPORT$, 0, 0 : PROCcleanup : QUIT
...
PROCcleanup
QUIT
DEF PROCcleanup
dlg% += 0 : IF dlg% PROC_closedialog(dlg%)
ENDPROC Also remember not to use the 'emergency stop' feature (e.g. the Stop button in the toolbar) which bypasses the cleanup and therefore is likely to trigger the crash.
Incidentally, being aware of this characteristic of the BB4W IDE, I designed the LB Booster IDE to work differently - when you execute a program in LBB it runs as a separate process, making it immune to crashes of this sort.
Richard.
|
| « Last Edit: May 31st, 2014, 7:47pm by rtr » |
Logged
|
|
|
|
g3nrw
Junior Member
member is offline


Posts: 74
|
 |
Re: Create a Tooltip for a Control
« Reply #5 on: Jun 2nd, 2014, 10:41am » |
|
on May 31st, 2014, 1:30pm, Richard Russell wrote:Also remember not to use the 'emergency stop' feature (e.g. the Stop button in the toolbar) which bypasses the cleanup and therefore is likely to trigger the crash.
Richard. |
|
Yes, I had already incorporated the cleanup code you mentioned, but recently I have got into the (bad) habit of terminating the program with an emergency stop. Previously this had not been an issue, but after I added the tooltips code, it seems to have become one. I am now terminating the program "properly", and the crashes have gone.
-- Ian
|
|
Logged
|
|
|
|
|