It worked for me too but showing the cursor again failed. Once it was hidden, that's where it stayed. Resetting it didn't work until the bug got fixed in my custom engine build. Craig says it doesn't work in LC 9 but maybe it's in LC 10, though I don't recall seeing any mention in the release notes.FourthWorld wrote: ↑Thu Jul 11, 2024 8:55 pmThe method I posted above has worked reliably for me for decades. If it's not working for you I would look elsewhere for the cause, perhaps an engine bug, or a corrupt cursor, or an oddity with a display driver, or something else.
Hiding the cursor
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Hiding the cursor
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Hiding the cursor
In v9.x when I tested that here on a Mac unlocking the cursor restored normal behavior.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Hiding the cursor
Jacque, Richard. Attached again are two stacks.
The first,"Wonky" shows the erratic behavior of a "hidden" cursor using only the two-liner in btn "Button" that you both seem to think works fine.
The second, "Insanity" shows an actual working hidden cursor from a handler in btn "Hide Cursor". This can change to watch in a two-line handler in btn "View Cursor". It also shows a five-line handler in the card script that is required to change the cursor to "arrow". Comment out lines 1 and 2 and it will not work.
The difference is in trying to revert directly to arrow. I could not do that. One can, however, go from "hidden" to any other cursor style, as long as it is not "arrow" or "hand'. To go from from "hidden" to either requires an intermediate step.
So there.
Craig
The first,"Wonky" shows the erratic behavior of a "hidden" cursor using only the two-liner in btn "Button" that you both seem to think works fine.
The second, "Insanity" shows an actual working hidden cursor from a handler in btn "Hide Cursor". This can change to watch in a two-line handler in btn "View Cursor". It also shows a five-line handler in the card script that is required to change the cursor to "arrow". Comment out lines 1 and 2 and it will not work.
The difference is in trying to revert directly to arrow. I could not do that. One can, however, go from "hidden" to any other cursor style, as long as it is not "arrow" or "hand'. To go from from "hidden" to either requires an intermediate step.
So there.

Craig
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Hiding the cursor
Thanks for making those. I'll take a look when I'm at a computer.
In the meantime, could you please tell us what LC and OS versions you're using?
In the meantime, could you please tell us what LC and OS versions you're using?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Hiding the cursor
They both seem to work well here.
I was able to bring back the arrow icon by using "unlock cursor" in the Message Box.The difference is in trying to revert directly to arrow. I could not do that. One can, however, go from "hidden" to any other cursor style, as long as it is not "arrow" or "hand'. To go from from "hidden" to either requires an intermediate step.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Hiding the cursor
Richard.
So you have no jitter in the "Wonky" stack when the cursor is still in the rect of the button?
And you are able to simplify the two handlers in the "Insanity" stack. First the card script: so that you can retrieve the arrow cursor as soon as the mouseLoc leaves btn "hide cursor" and click somewhere on the card.
And you are able to, say, change the cursor from "hand"to "watch" in btn "Hide Cursor": to make the cursor stable in all areas until you click somewhere, and with the "lock cursor" line uncommented?
I cannot do any of that. LC 9.6.9 Mac OS 13.4 Venturi.
Craig
So you have no jitter in the "Wonky" stack when the cursor is still in the rect of the button?
And you are able to simplify the two handlers in the "Insanity" stack. First the card script:
Code: Select all
on mouseUp
-- set the defaultCursor to plus
-- set the cursor to plus
set the defaultCursor to arrow
set the cursor to arrow
lock cursor
end mouseUp
And you are able to, say, change the cursor from "hand"to "watch" in btn "Hide Cursor":
Code: Select all
on mouseUp
set the defaultCursor to watch --changed from "hand"
set the cursor to none
lock cursor
end mouseUp
I cannot do any of that. LC 9.6.9 Mac OS 13.4 Venturi.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Hiding the cursor
Your latest reply suggests a level of specificity in perceiving the issue that I wasn't looking for. I saw the cursor change, it persisted, I noted that and went back to work. "Jitter" was not something I was looking for, and can mean different things.
The code also uses both lockCursor and defaultCursor properties, already clarified as designed to solve different needs.
So let's take this from the top:
Can you please describe what you want to do, and what you're seeing instead?
Can you try this using any script that doesn't mix the two global properties known to be designed different purposes?
Apparently I may be a bit slow on the uptake. Spell out the expected result and the actual result with enough detail that I can hone in on what you're experiencing.
The code also uses both lockCursor and defaultCursor properties, already clarified as designed to solve different needs.
So let's take this from the top:
Can you please describe what you want to do, and what you're seeing instead?
Can you try this using any script that doesn't mix the two global properties known to be designed different purposes?
Apparently I may be a bit slow on the uptake. Spell out the expected result and the actual result with enough detail that I can hone in on what you're experiencing.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Hiding the cursor
Richard.
None of this was for me. It started with the thread I referenced in my first post here. As you know, I will do anything that takes me away from my day job.
So from the top, I cannot right now. At home I am on LC 9.6.1 on an old laptop in OS 10.15.7 and all three stacks I posted in this thread are acting badly. They all have jittery cursors wherever I make, hide or move them.
Will get back to you next week back in 9.6.9 on a Mac Mini. But what machine are you on?
Craig
None of this was for me. It started with the thread I referenced in my first post here. As you know, I will do anything that takes me away from my day job.
So from the top, I cannot right now. At home I am on LC 9.6.1 on an old laptop in OS 10.15.7 and all three stacks I posted in this thread are acting badly. They all have jittery cursors wherever I make, hide or move them.
Will get back to you next week back in 9.6.9 on a Mac Mini. But what machine are you on?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Hiding the cursor
Right now on a Mac M1 running macOS 12.6.3.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Hiding the cursor
While researching some other fixes I found this item in the Release Notes for v9.6.10:
"Problems with setting a cursor or setting the lockCursor when entering a control"
https://quality.livecode.com/show_bug.cgi?id=18428
Not sure if this relates to what you're seeing, but since both of your installs are earlier than this cursor change it may be worth updating to see if the new version helps.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn