LB Booster
Programming >> Liberty BASIC language >> LB: TRAPCLOSE does not work correctly in text wind http://lbb.conforums.com/index.cgi?board=lblang&action=display&num=1443608758 LB: TRAPCLOSE does not work correctly in text wind
Post by RNBW on Sep 30th, 2015, 10:25am
A bug (actually a known bug!) has been identified in the LB Conforum yesterday.
The following code ignores the user's instruction in the Confirm box. The work around is to open "for window as" instead of "for text as".
The code: Code:
nomainwin
open "Trapclose bug" for text as #w
#w "!trapclose [ask]"
wait
[ask]
confirm "Close the window?"; answer$
if answer$ = "yes" then
close #w
end
end if
wait
This is NOT a bug using LBB. The code works.
Yet another star for LBB!!! Re: LB: TRAPCLOSE does not work correctly in text
Post by tsh73 on Sep 30th, 2015, 12:15pm
I really wonder how it could be a bug in LBB, if LB & LBB does not share any codebase? You are not expecting LB bugs manifest in C# or FORTRAN, aren't you?
Re: LB: TRAPCLOSE does not work correctly in text
Post by Richard Russell on Sep 30th, 2015, 3:40pm
I really wonder how it could be a bug in LBB, if LB & LBB does not share any codebase? You are not expecting LB bugs manifest in C# or FORTRAN, aren't you?
LB and LBB could share a 'bug', if the origin lies in some behaviour of the Windows API. For example, I think both at one time shared a common problem if the font of a listbox or combobox was changed (the horizontal scroll range wasn't correctly adjusted). Considering that the Close button is very much a feature of Windows, you should perhaps not be so dismissive of the possibility of the bug affecting LBB.
But otherwise a shared bug would have to be a coincidence, or result from me having deliberately copied a 'bug' in the interests of compatibility (as I did with the LL, UR and LR button anchors).
Richard.
Re: LB: TRAPCLOSE does not work correctly in text
Post by RNBW on Sep 30th, 2015, 7:39pm
I really wonder how it could be a bug in LBB, if LB & LBB does not share any codebase? You are not expecting LB bugs manifest in C# or FORTRAN, aren't you?
No I wasn't expecting a bug, because I'm sure if it had been a bug in BBC Basic Richard Russell would have corrected it long ago, or as he stated in his post, it had been deliberate to maintain compatibility.
The reason I posted was simply to make the point that the code worked in LBB, whereas it didn't in LB.
Re: LB: TRAPCLOSE does not work correctly in text
Post by tsh73 on Oct 1st, 2015, 07:26am
RNBW, such kind of bugs - "plainly don't work in LB" - is really not an issue for LB programmer, at all. You run at it once - it clearly don't work - you just do it some other way, ever after.
Re: LB: TRAPCLOSE does not work correctly in text
Post by RNBW on Oct 1st, 2015, 07:29am
RNBW, such kind of bugs - "plainly don't work in LB" - is really not an issue for LB programmer, at all. You run at it once - it clearly don't work - you just do it some other way, ever after.
On that we agree!
Re: LB: TRAPCLOSE does not work correctly in text
Post by Richard Russell on Oct 1st, 2015, 08:28am
Such kind of bugs ... is really not an issue for LB programmer, at all. You run at it once - it clearly don't work - you just do it some other way, ever after.
So, if I understand correctly, you are saying that a bug is never important so long as there is a workaround? I cannot agree with that!
Admittedly it does seem that Carl shares your opinion, since only a small proportion of the bugs documented at the LB Bug Tracker Wiki were fixed when LB was updated from 4.04 to 4.5.0.
All I can say is that my attitude to software support is completely different. LBB is officially discontinued, but I still feel obliged to fix any significant bugs (whether there is a workaround or not).
Richard. Re: LB: TRAPCLOSE does not work correctly in text
Post by tsh73 on Oct 1st, 2015, 09:03am
Quote:
you are saying that a bug is never important so long as there is a workaround?
No. I meant that - bug that makes thing clearly don't working is not a big issue because progammer will not use bugged construction in a program. But surely - it does limit effective language programmer can use, and it is bad. Having workaround is a nice option, but having working thing much better yet.
As for my attitude, I have thing posted in a wall: "A programmer should never, ever work on new code if they could instead be fixing bugs (Joel Spolsky)". I may be not living up to it but still
As for Carl's attitude I really have no idea (
Re: LB: TRAPCLOSE does not work correctly in text
Post by Richard Russell on Oct 1st, 2015, 11:07am