Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ Forum
➜ Suggestions
➜ Scripting Error Popup
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Mkn07
(5 posts) Bio
|
Date
| Sat 04 May 2013 01:48 AM (UTC) |
Message
| I have been trying to use the hotspots and mouse handlers.
Whenever I create an error in one of the mouse handler functions (I'm a rookie), the scripting error popup gets stuck in a loop or something and I have to force the client to quit.
So I'm wondering if there is some method to prevent that from happening aside from writing flawless code on the first try. | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #1 on Sat 04 May 2013 02:27 AM (UTC) |
Message
| You don't need to write flawless code to avoid writing infinite loops. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Mkn07
(5 posts) Bio
|
Date
| Reply #2 on Sat 04 May 2013 03:33 AM (UTC) |
Message
| Thank you but that isn't helpful at all.
It isn't from loops I write. It's like any generic sort of error, like arithmetic on a nil value or indexing a nil or string expected but got a number, etc.
When that happens in a mouse handler function then the scripting error just keeps repeating every time I attempt to close the popup.
I was asking if there is some setting I have missed that prevents that. If not, then this is meant as a suggestion to include that feature. | Top |
|
Posted by
| Mkn07
(5 posts) Bio
|
Date
| Reply #3 on Sat 04 May 2013 04:52 AM (UTC) |
Message
| I've forced an error in all of the hotspot handlers I know of now. I should have done that first maybe.
It seems only when an error happens in the dragmove handler that it keeps repeating and the popup goes loopy. | Top |
|
Posted by
| Mkn07
(5 posts) Bio
|
Date
| Reply #4 on Sat 04 May 2013 05:26 AM (UTC) |
Message
| Ok so never mind. It isn't infinite and the popup will close eventually. Somehow the dragmove function is calling a dozen times or so right out of the gate and the errors are just stacking up. Sorry. | Top |
|
Posted by
| Nick Gammon
Australia (23,121 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sat 04 May 2013 07:16 AM (UTC) |
Message
| I suggest you turn on the "errors to the output window". That pop-up window is particularly annoying. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Mkn07
(5 posts) Bio
|
Date
| Reply #6 on Sat 04 May 2013 09:28 AM (UTC) |
Message
| I did more digging and put a counter in the dragmove function. If I hold down the mouse button, the function will call about once per second. I assume there's a good reason for that and that it is written into a hardware interrupt thingy.
If I force an error, that safety seems to be ignored and the function gets called as fast as it can be while the mouse button is held down. Apparently it takes about 50 calls before my brain, eyes, and finger react to the error popup and release the button, stacking all of the popups. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
22,736 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top