Page 2 of 5
Re: Dialog box selections using keyboard.
Posted: Thu Feb 16, 2023 8:54 am
by richmond62
What Richmond did is fine because he rolled his own dialog box. That is just another LC gadget.
1. Not sure about that, as every time Richmond rolls his own 2 people, predictably, react negatively.
2. Surely, given the lack of 'movement' in a lot of areas, a repository of publically
and freely available hand-rolled gadgets might not be a bad thing?
Re: Dialog box selections using keyboard.
Posted: Thu Feb 16, 2023 11:04 am
by Klaus
CAsba,
this is NOT what Richmond tried to tell you with his example of a "selfmade" dialog!
Maybe you want to take another look at his example!
I presume you are working on Windows, which explains why your script does indeed work out of the box, that is what Jacque told you in her post.
You should really read all of our answers and
ASK if something is not clear enough and you don't understand.
If you don't then we are wasting our time.
Code: Select all
answer question "You have entered the business name as:" ... with "YES" or "NO"
We cannot modify the LC dialog boxes like you tried to do in your example.
Even if we could, your "set the traversalon..." will be executed AFTER the dialog has already been closed again, so we would need to apply our modifactions BEFORE we issue "answer ..."
Code: Select all
answer "whatever..."...
set the traversalon of btn "YES" to true
set the traversalon of btn "NO" to true
The LC ASK and ANSWER dialogs are opened as MODAL, which means everything in the script will stop and wait until the dialogs have closed by clicking OK, CANCEL or any of these buttons in the dialogs.
Re: Dialog box selections using keyboard.
Posted: Thu Feb 16, 2023 12:21 pm
by richmond62
There seem to be lots of people who turn to the forums for advice and then do NOT
read CAREFULLY what they are told, and often, subsequently, make unsubstantiatable
claims about things the say they have achieved using a 'mash-up' of bits and bobs they
have picked up on the forums with no obvious signs that they have understood anything.
But, to my mind, this is symptomatic of a certain recent attitude, that computer programming can
be achieved by cobbling together bits of code with no real work and no real thinking: this has probably
come about because of silly adverts containing phrases such as 'no code'.
Re: Dialog box selections using keyboard.
Posted: Thu Feb 16, 2023 7:01 pm
by jacque
The problem seems to be just a misunderstanding about how dialogs work. LC has a huge body of required knowledge. CAsba was applying what he knows about non-modal stack behavior.
Re: Dialog box selections using keyboard.
Posted: Thu Feb 16, 2023 8:50 pm
by dunbarx
Richmond.
1. Not sure about that, as every time Richmond rolls his own 2 people, predictably, react negatively.
Am I one of those two? If so you misread my intent. I was not denigrating you or your efforts. I was trying to make a clear distinction between a custom, home-made LC gadget, to which all of the power of LC itself is available, as opposed to a call to a standard dialog box, to which very little indeed is.
There is nothing but pride one should take in rolling one's own, however home-made they are. It is what makes LC so fun and powerful.
Anyway, really? Do you think that I have that low an opinion of you? I do not at all. Well, apart from your habit of posting handfuls of replies in succession. If you keep that up, you will surpass my total number of posts soon, and I will be heartbroken.
Craig
Re: Dialog box selections using keyboard.
Posted: Thu Feb 16, 2023 9:19 pm
by richmond62
Sorry to disappoint you, Craig, but you are not among that pair.
apart from your habit of posting handfuls of replies in succession.
Err, just the way my mind works (or doesn't).

Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 11:49 am
by CAsba
OK, I deleted the linesa
Code: Select all
set the traversalon of btn "YES" to true
set the traversalon of btn "NO" to true
and the tab still works, changing the focus from YES to NO and viceversa.
I'm pretty sure the tab didn't do this before, so now I'm at a loss as to how the tab now works ! However, it DOES.
Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 12:02 pm
by stam
CAsba wrote: Fri Feb 17, 2023 11:49 am
...the tab still works, changing the focus from YES to NO and viceversa.
I'm pretty sure the tab didn't do this before, so now I'm at a loss as to how the tab now works ! However, it DOES.
Presumably you're on Windows.
As others mentioned this is the default
system setting, and the modal is set to be consistent with the system.
Consequently this does not work by default on MacOS unless you change the
system setting.
Unless I'm greatly misunderstanding the question?
Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 1:48 pm
by richmond62
IF you are planning to produce standalones for other operating systems than the one you are developing on you had better be *&^%£#@! careful that 'things' behave on those systems in the same way as you have set them up on your home system.
As has been mentioned MORE THAN ONCE in this thread, the traversalOn default settings are different on different operating systems: so try to absorb and act on that bit of vital information before your modal dialogs go 'all funny' on clients' computers.
Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 4:29 pm
by CAsba
Thanks, all of you, even for the bad press. I am suitably scolded. But perhaps I should give my point of view - though perhaps not meeting with universal approval.
Right, Here goes..
I have had NO training in any coding. I am 77 years old and my project is a retirement one, I retired from small business 8 years ago.
About 30 years ago I bought a business accounts package - TAS Books, which was a huge disappointment to me; it was sooo user-unfriendly. Eventually I got into it and it was good in many ways, but, it was written for accountancy professionals, and there were areas of it that remained baffling, when I would have to consult - and pay - the 'high priest', the accountant.
I picked up VBA (part of Excel) and made several handy programmes for the businesses I ran. I got quite familiar with VBA. When I retired I started a project, an accounts package that would be the ultimate tool for small business, to operate within Excel using VBA.
I spent 5 years of my spare time on it. Then I discovered one by one all the drawbacks of VBA, and looked for a better solution, and last August I got hold of LC, and I've made good progress. Now, here's the point.. I DO pick out the bits that I need for my project, and, to be frank, my attitude is a pragmatic one to drive the project on, with little interest in the larger view of LC. There, I've said it. I do hope this won't alienate me on the forum, which has been such a huge help to me, but I thought it necessary to explain 'where I'm coming from'.
Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 5:44 pm
by richmond62
Well, I don't know about anyone else, but your contextualisation makes me
feel very pro you.

Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 5:57 pm
by dunbarx
@CAsba. And I thought Jacque and I were the oldest people here. Do not overFret overmuch about the back and forth here. Nobody is mad at you. We have all been there.
@ Richmond. "Contextualization" is not a word allowed in Scrabble, so do not use it. Though in the dictionary, it will not fit on the board.
On the other hand, "overFret" is a word, especially in Scotland, but not permitted in Scrabble. It is permitted in LC-related posts such as this one, however, since I capitalized the "F".
Craig
Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 6:51 pm
by mwieder
Why is overfret a word but underfret is not?
...and I see that overfrate is an "acceptable" past tense, which I find quite annoying.
https://en.wiktionary.org/wiki/overfret
Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 7:38 pm
by jacque
CAsba wrote: Fri Feb 17, 2023 4:29 pm
Thanks, all of you, even for the bad press. I am suitably scolded. But perhaps I should give my point of view - though perhaps not meeting with universal approval.
You have my universal approval, and I hope this thread hasn't scared you away from us.
Re: Dialog box selections using keyboard.
Posted: Fri Feb 17, 2023 7:50 pm
by richmond62
Ah, but wait a moment: I did NOT write 'contextualization', I wrote 'contextualisation', having at SIUC, Carbondale, got my feet wet by trying to be American, and just getting my feet wet producing Mid-Atlantic English [neither one thing nor the other].
AND while I am here I should state that I jalouse most umbrageously at 'dialog'.
