LB Booster
« LB: TRAPCLOSE does not work correctly in text wind »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 05:00am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: LB: TRAPCLOSE does not work correctly in text wind  (Read 861 times)
RNBW
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 106
xx LB: TRAPCLOSE does not work correctly in text wind
« Thread started 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!!!
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: LB: TRAPCLOSE does not work correctly in text
« Reply #1 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?
« Last Edit: Sep 30th, 2015, 12:19pm by tsh73 » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: LB: TRAPCLOSE does not work correctly in text
« Reply #2 on: Sep 30th, 2015, 3:40pm »

on Sep 30th, 2015, 12:15pm, tsh73 wrote:
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.
« Last Edit: Sep 30th, 2015, 3:53pm by Richard Russell » User IP Logged

RNBW
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 106
xx Re: LB: TRAPCLOSE does not work correctly in text
« Reply #3 on: Sep 30th, 2015, 7:39pm »

on Sep 30th, 2015, 12:15pm, tsh73 wrote:
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.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: LB: TRAPCLOSE does not work correctly in text
« Reply #4 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.
User IP Logged

RNBW
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 106
xx Re: LB: TRAPCLOSE does not work correctly in text
« Reply #5 on: Oct 1st, 2015, 07:29am »

on Oct 1st, 2015, 07:26am, tsh73 wrote:
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!
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: LB: TRAPCLOSE does not work correctly in text
« Reply #6 on: Oct 1st, 2015, 08:28am »

on Oct 1st, 2015, 07:26am, tsh73 wrote:
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.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: LB: TRAPCLOSE does not work correctly in text
« Reply #7 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 smiley

As for Carl's attitude I really have no idea sad(
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: LB: TRAPCLOSE does not work correctly in text
« Reply #8 on: Oct 1st, 2015, 11:07am »

on Oct 1st, 2015, 09:03am, tsh73 wrote:
"A programmer should never, ever work on new code if they could instead be fixing bugs (Joel Spolsky)".

Good maxim! I don't always live up to it either, but I try.

Richard.
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