BBC BASIC for Windows
« Create a Tooltip for a Control »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:26pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Create a Tooltip for a Control  (Read 849 times)
g3nrw
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 74
xx Create a Tooltip for a Control
« Thread started on: May 29th, 2014, 8:16pm »

Richard

At the risk of being told to RTFM (again), is there any way in BB4W to create tooltips for *controls* (as distinct from toolbars)?

--
Ian
User IP Logged

rtr
Guest
xx Re: Create a Tooltip for a Control
« Reply #1 on: May 29th, 2014, 8:51pm »

on May 29th, 2014, 8:16pm, g3nrw wrote:
is there any way in BB4W to create tooltips for *controls*

http://bb4w.wikispaces.com/Adding+tooltips+to+a+dialogue+box

Richard.
User IP Logged

g3nrw
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 74
xx Re: Create a Tooltip for a Control
« Reply #2 on: May 30th, 2014, 07:52am »

Just the job. Thanks yet again Richard.

--
Ian
User IP Logged

g3nrw
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 74
xx Re: Create a Tooltip for a Control
« Reply #3 on: May 31st, 2014, 12:57pm »

Richard

Following your recent help and guidance, I have now almost completed (what I will call here) Program #1. Basically it is a dialog box containing about 30 controls. Program #1 does not contain any tooltips code. It works exactly as expected, without any hiccups.

I have now created Program #2. This is exactly the same as Program #1, but with tooltips added for most of the controls. The tooltips code very closely follows the example at:

http://bb4w.wikispaces.com/Adding+tooltips+to+a+dialogue+box

Again, this program works exactly as expected, except for one thing. Typically, I edit some code, run the program, then stop it (Run>Stop in the editor window), then edit some more code. Then, after a few minutes of editing (~4-5 minutes), BB4W crashes completely without warning, and I have to restart it.

This is quite reproducible: edit, run once, edit, crash. If I don't run the program, BB4W doesn't crash.

I'm sure the fault is mine -- I have spent several hours scouring the code for a mistake -- but before I dig any deeper, I wonder if you have seen anything like this before.

For the record, I am running BB4W v5.94a, under Windows 7 32-bit, if that's relevant.

--
Ian

« Last Edit: May 31st, 2014, 1:07pm by g3nrw » User IP Logged

rtr
Guest
xx 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 » User IP Logged

g3nrw
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 74
xx 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
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls