LB Booster
« Auto scroll to the top of main window? »

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



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: Auto scroll to the top of main window?  (Read 814 times)
Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Auto scroll to the top of main window?
« Reply #6 on: Aug 24th, 2015, 1:02pm »

I wasn't having a go at LBB specifically because I didn't realise it was just a function of LBB and not LB. I'm quite sure it is the most sensible way of handling carrot repositioning. I just wasn't expecting to encounter a temporal function, hence my confusion. No offence intended :)

It would be nice to have a way to disable the timing though to allow for situations that I encountered.

I implemented what I was after using the following code instead of a straight CLS instruction.

Code:
[clear]
    CLS
    timer 200, [skip]
    wait
[skip]
    timer 0
    return 


User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Auto scroll to the top of main window?
« Reply #7 on: Aug 24th, 2015, 1:52pm »

on Aug 24th, 2015, 1:02pm, Monkfish wrote:
No offence intended :)

None taken.

Quote:
It would be nice to have a way to disable the timing though to allow for situations that I encountered.

I don't think there's any practical way to disable it. You could speed up the timer, and hence reduce the delay (to a minimum of about 10 milliseconds), but not eliminate it:

Code:
    !*timer 10 

Bear in mind that the mainwin is intended primarily as a debugging aid - its principal purpose is as somewhere to output diagnostic messages during software development. Normally one would expect a nomainwin statement to be added before the program is finally deployed.

Using the mainwin as the main user interface is discouraged, although it can be convenient in 'quick and dirty' applications. As a rule a text window will be a better choice for that purpose. Is there a specific reason why you don't want to do it that way?

Richard.
User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Auto scroll to the top of main window?
« Reply #8 on: Aug 24th, 2015, 6:43pm »

Quote:
Is there a specific reason why you don't want to do it that way?


Well, when I started to write this program a year ago I didn't know how to mimic the action of the main window in another window. I could probably work out how to do that now, but it would just be too much work to go through and change everything. My program was intended to work like a terminal interface anyway... although I would probably do it differently if I was starting over.

It seems to work okay which is the main thing (with a lot of help from yours truly wink )
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Auto scroll to the top of main window?
« Reply #9 on: Aug 25th, 2015, 11:41am »

on Aug 24th, 2015, 6:43pm, Monkfish wrote:
It seems to work okay which is the main thing (with a lot of help from yours truly wink )

Looking at my code, it would be possible to make CLS reset the scroll position 'immediately' rather than after a delay, and with hindsight I should probably have done that. I will make a note of it for a future version, if any.

Richard.
User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Auto scroll to the top of main window?
« Reply #10 on: Aug 25th, 2015, 1:28pm »

Great ;D

Code:
 !*timer 10  


Does this instruction affect the timer function in general? I'm using the timer function quite a bit in my code.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Auto scroll to the top of main window?
« Reply #11 on: Aug 25th, 2015, 3:47pm »

on Aug 25th, 2015, 1:28pm, Monkfish wrote:
Does this instruction affect the timer function in general?

As far as I'm aware it affects only the maximum delay before the mainwin scrolls.

If this issue is a major inconvenience I will make a 'custom' version of LBB for you that scrolls immediately on a CLS.

Richard.
User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Auto scroll to the top of main window?
« Reply #12 on: Aug 25th, 2015, 9:54pm »

No that seems to work fine Richard. Thanks for the offer though smiley
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