BBC BASIC for Windows
« Close icon problem »

Welcome Guest. Please Login or Register.
Apr 6th, 2018, 12:07am



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 2  Notify Send Topic Print
 hotthread  Author  Topic: Close icon problem  (Read 388 times)
mavison
New Member
Image


member is offline

Avatar




PM


Posts: 14
xx Re: Close icon problem
« Reply #11 on: Mar 17th, 2010, 3:25pm »

I did *look* at the assembler code, but made very little sense of it. I have now done a bit of research, and it seems that the dialog is defined with the address of some assembler code which is called (D%? or T%?). I am not sure of the precise mechanism, but when there is a message the code you refer to gets called if the Close icon has been clicked, presumably before the message is passed to the Basic program.

I think I have taken enough of your time, Richard! Many thanks for your patience and explanations. My current vague understanding will do for the moment.

Martin
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Close icon problem
« Reply #12 on: Mar 17th, 2010, 6:49pm »

on Mar 17th, 2010, 3:25pm, mavison wrote:
I did *look* at the assembler code, but made very little sense of it. I have now done a bit of research...

Why do you feel the need to understand it? Is it just curiosity? The whole point of libraries is that you don't need to look at the code, and most certainly you don't need to understand it! The supplied libraries in particular are designed to be fast and compact, not readable.

With other languages libraries are often supplied as machine code object modules, without any source code being provided; that doesn't stop people using them. Because of the way BBC BASIC works you can look at the code of the libraries, but you are not expected to.

I would urge you to overcome your curiosity, and simply treat the libraries as 'black boxes'. If you could bring yourself simply to accept what I say at face value, rather than needing to verify it for yourself, your BBC BASIC programming experience ought to be more pleasurable.

Richard.
User IP Logged

mavison
New Member
Image


member is offline

Avatar




PM


Posts: 14
xx Re: Close icon problem
« Reply #13 on: Mar 17th, 2010, 10:23pm »

I just wanted to understand what was changing !dlg%, why and when, as it was a variable used in my code. My 40 years in computing have taught me never to make assumptions!

And the Windows API is totally new to me, so I admit some desire to understand it better.

Martin
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Close icon problem
« Reply #14 on: Mar 18th, 2010, 12:29am »

on Mar 17th, 2010, 10:23pm, mavison wrote:
My 40 years in computing have taught me never to make assumptions!

I can claim almost 40 years in computing too (probably wrote my first program, either in Fortran or FOCAL, in late 1970), but what I've learnt is that you should make assumptions - you should assume that what the documentation says will happen actually will happen! When you program in BBC BASIC you assume the interpreter will behave how it's documented to behave; you don't ask to see its source code. When you call a Windows API you assume it will behave how MSDN says it will behave, you don't ask to see Microsoft's code.

Quote:
And the Windows API is totally new to me, so I admit some desire to understand it better.

Trying to learn about the Windows API by looking at the supplied libraries really is jumping in at the deep end. The complications of assembler code and multi-threading severely get in the way of understanding.

Far better, at least initially, to learn how to access API routines directly from a BASIC program. There are many published examples, Wiki articles etc. that you can study.

Richard.
User IP Logged

mavison
New Member
Image


member is offline

Avatar




PM


Posts: 14
xx Re: Close icon problem
« Reply #15 on: Mar 19th, 2010, 4:18pm »

I take documented things as facts, not assumptions, so we actually are agreeing!

My problem was that I had not noticed the bit in help which says that !dlg%=0 indicates the window is closed. I now have, and I am happy.

Thanks for your help
Martin
User IP Logged

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

| |

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