Page 1 of 1
Annoying scrolling with the mouse wheel in the script editor.
Posted: Sun Apr 04, 2021 11:33 pm
by Fermin
Is there any way to reduce the jumping of the mouse wheel in the script editor?
I don't know if it only happens on Mac but with every little movement, sometimes unintentionally, the text scrolls 8 or 9 lines and it's very easy to lose sight of where I was working. I have to be selecting groups of lines so that, when changing colour, it gives me a visual reference. It's certainly not serious but it is quite uncomfortable. I don't know if this happens to anyone else. I've had the same problem for years and I still haven't found the solution.
And I don't think it's a matter of system preferences because it only happens in Livecode and only in the script editor.
Any suggestions?
Thank you very much.
Translated with
www.DeepL.com/Translator (free version)
Re: Annoying scrolling with the mouse wheel in the script editor.
Posted: Mon Apr 05, 2021 7:40 am
by SparkOut
On Windows I have had issues in the SE where a one-line scroll doesn't stop when it should, continuing without a way of interruption usually until it reaches the top or bottom limit of the script. It is one of many aberrant behaviours in the Windows SE that have defied diagnosis for a long time. Each new version of LC seems to be a bit improved each time, with a few exceptions. Interestingly, I have not had the unstable scroll for a couple of releases. It is odd that these kinds of SE glitches are now being found on Macs too.
Re: Annoying scrolling with the mouse wheel in the script editor.
Posted: Mon Apr 05, 2021 3:52 pm
by dunbarx
I am on a Mac, and have had to live with this forever. The vertical scroll thumb itself is more responsive, but still not perfectly smooth or finely tuned. All these properties are set in the system prefs, not in LC.
But the SE is just a stack. Perhaps something like this might be placed in the SE stack script?
Code: Select all
on rawKeyDown tKey
if tkey = 65308 then set the scroll of the target to the scroll of the target + 10
else if tkey = 65309 then set the scroll of the target to the scroll of the target - 10
end rawKeyDown
The "10" is just a suggestion. This works well in a standard scrolling field, giving much finer control.
Craig
Re: Annoying scrolling with the mouse wheel in the script editor.
Posted: Mon Apr 05, 2021 8:42 pm
by jacque
dunbarx wrote: ↑Mon Apr 05, 2021 3:52 pm
I am on a Mac, and have had to live with this forever.
Ditto. I posted this to the mailing list back in 2015:
You've never had that thing happen where you brush up against the mouse and your very long script goes madly scrolling at top speed off into the ether in a direction you can't pinpoint because it happens so fast, careening completely out of control and losing your place, causing you to forget where you were in the code and you can't find it again for a minute, which makes you so furious that you say things you aren't supposed to say, and then your spouse feels guilty because they think they did something you don't like but they don't know what it was?
Re: Annoying scrolling with the mouse wheel in the script editor.
Posted: Tue Apr 06, 2021 12:43 am
by Fermin
Re: Annoying scrolling with the mouse wheel in the script editor.
Posted: Tue Apr 06, 2021 5:14 am
by dunbarx
I have only done this here and there, being skittish about fooling around with the foundations of LC, but they have all been successful. This:
Code: Select all
edit the script of stack "revnewscripteditor 1"
with this added to the stack script so that more than one field will be controlled:
Code: Select all
on rawKeyDown tKey
if tkey = 65308 then set the scroll of the target to the scroll of the target + 10
else if tkey = 65309 then set the scroll of the target to the scroll of the target - 10
end rawKeyDown
You can always clear the script if you need to.
Craig
Re: Annoying scrolling with the mouse wheel in the script editor.
Posted: Sun Apr 11, 2021 7:03 pm
by Fermin
Thank you very much, Craig - sorry for the delay - I have tried your method (rawKeyDown) and although I see that it works, it has some drawbacks. I'll keep testing.

Re: Annoying scrolling with the mouse wheel in the script editor.
Posted: Tue Apr 13, 2021 9:52 pm
by dunbarx
Hi.
Find anything definitive in your investigations?
Craig
Re: Annoying scrolling with the mouse wheel in the script editor.
Posted: Wed Apr 14, 2021 12:51 pm
by Fermin
The truth is that I haven't looked at it for days. I remember that I couldn't write anything in the script, I guess because of rawKeyDown. And I also had to open a new window every time I needed to edit the script of an object (control) -and I always have dozens of controls-. Anyway, I guess not being something 'very native' to LiveCode it doesn't provide as 'straightforward' a solution as I would like. For the moment I've put the topic aside, although I guess I'll come back at some point.
Translated with
www.DeepL.com/Translator (free version)