Author |
Topic: Auto scroll to the top of main window? (Read 820 times) |
|
Monkfish
Full Member
member is offline


Gender: 
Posts: 104
|
 |
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
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
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: 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: 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.
|
|
Logged
|
|
|
|
Monkfish
Full Member
member is offline


Gender: 
Posts: 104
|
 |
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 )
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
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 ) |
|
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.
|
|
Logged
|
|
|
|
Monkfish
Full Member
member is offline


Gender: 
Posts: 104
|
 |
Re: Auto scroll to the top of main window?
« Reply #10 on: Aug 25th, 2015, 1:28pm » |
|
Great ;D
Code:
Does this instruction affect the timer function in general? I'm using the timer function quite a bit in my code.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
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.
|
|
Logged
|
|
|
|
Monkfish
Full Member
member is offline


Gender: 
Posts: 104
|
 |
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
|
|
Logged
|
|
|
|
|