Hide cursor, yes, no, depends... HELP!

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Hide cursor, yes, no, depends... HELP!

Post by richmond62 » Mon Jul 08, 2024 4:19 pm

I just 'hosed' my cursors by putting this is in a button:

Code: Select all

on mouseUp
set the cursor to empty
end mouseUp
note the word 'empty' rather than the word 'none'.

This prove to have rather more consequences than I expected as, to QUIT LiveCode I had to perform a 'force quit' (send a KILL signal).

What IS interesting is that this did not work:

Code: Select all

on openStack
   set the cursor to empty
end openStack
this did:

Code: Select all

on openStack
   set the cursor to empty
   set the lockCursor to true
end openStack
it ALSO worked in the cardScript.

What interests me is why, in those scripts one had to set the lockCursor, but that was not necessary in the button.
Last edited by richmond62 on Mon Jul 08, 2024 4:33 pm, edited 2 times in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by FourthWorld » Mon Jul 08, 2024 4:27 pm

SWEdeAndy wrote:
Mon Jul 08, 2024 4:09 pm
FourthWorld wrote:
Mon Jul 08, 2024 3:55 pm
SWEdeAndy wrote:
Mon Jul 08, 2024 12:13 pm
So if you have "on openStack" in the card script (of card 1) then it won't go up to the stack script unless you pass it. Right?
I'm not sure I understand the question. Any handler that handles a message would need to pass it for others further in in the message queue to handle it.
Indeed. It wasn't really a question, just me being extremely cautious when stating facts now, given my failure in that area earlier in the thread... So, just in case this would be a day when I get everything wrong, I put a question mark after things I say here... :D Right? 8)
A questioning approach is often useful in a life prioritizing increased awareness. 🙏

But the mundanity of software often requires less of our monkish journey:

The sequence in which the engine initiates open* messages follows container order, out to in, reflecting the sequence of their unpacking.

The path of a given message follows (generally speaking*) visual order, frontmost to backmost.

* frontScipts, backScripts, libraries, behaviors, "call", "via", "send", and "dispatch" are exceptions, where the usefulness of being able to tailor the message path for specific needs outweighs the abstraction those options introduce.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx » Mon Jul 08, 2024 5:27 pm

Richard.

"via"?

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx » Mon Jul 08, 2024 5:34 pm

Richmond.
note the word 'empty' rather than the word 'none'.
Not surprising, since "none" is not in the LC vocabulary.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx » Mon Jul 08, 2024 5:38 pm

Richmond.

Oops. "none" is indeed an option for cursors, even though it has no separate entry in the dictionary. It is a built-in cursor style. I was thrown because I:

Code: Select all

set the cursor to "none"
--instead of
set the cursor to none
Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx » Mon Jul 08, 2024 5:42 pm

I rarely use cursor styles. What is the cursor, "help"? This does nothing:

Code: Select all

set the cursor to help
Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Hide cursor, yes, no, depends... HELP!

Post by richmond62 » Mon Jul 08, 2024 5:57 pm

You: 'help' is a crock of @#$%.
-
Screenshot 2024-07-08 at 19.55.59.png
Attachments
Cursed.livecode.zip
Stack.
(1.01 KiB) Downloaded 160 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx » Mon Jul 08, 2024 6:21 pm

Richmond.

Crocks notwithstanding, all the buttons in your stack change the cursor to one of the built-in styles, except for "help", which does nothing. I assume that the "arrow" button actually works, though we do not see it because the arrow is already the "current" cursor.

Of course, they all revert to arrow when leaving their buttons, since only setting the defaultCursor forces the "current" cursor to stick.

Is that what you did not mean?

Craig
Last edited by dunbarx on Mon Jul 08, 2024 6:29 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Hide cursor, yes, no, depends... HELP!

Post by richmond62 » Mon Jul 08, 2024 6:26 pm

I assume that the "arrow" button actually works
It does "over here" because I have my default cursor set to red with a white border, with

Code: Select all

set the cursor to arrow
my cursor reverts to the 'standard' MacOS arrow (i.e. a black one).
Is that what you did not mean?
Wow! Gnomic. 8)

What I meant is that 'help' produces no obvious change whatsoever.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx » Mon Jul 08, 2024 6:34 pm

Richmond.
What I meant is that 'help' produces no obvious change whatsoever.
Aha. So my post
What is the cursor, "help"? This does nothing:
is the same as
'You: help' is a crock of @#$%.
Glad we agree. To anyone else, though, what is (was?) the story behind the "help" cursor style?

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by FourthWorld » Mon Jul 08, 2024 8:15 pm

dunbarx wrote:
Mon Jul 08, 2024 6:34 pm
To anyone else, though, what is (was?) the story behind the "help" cursor style?
It was intended to support an early form of contextual help.

There was a period in the early days of GUI PCs when at least a few software publishers included a "Help mode", which you could invoke with a menu selection or keystroke and the cursor would turn into a stylized question mark, until an element in the window is clicked. Then it would present a Help window with instructions on how to use that element.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx » Mon Jul 08, 2024 9:30 pm

@Richard.

Thanks.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx » Mon Jul 08, 2024 9:48 pm

All.

I had thought we fixed the "hide the cursor" problem using the defaultCursor. Recall this property allows the chosen cursor style to stick once that cursor leaves the control where it was set. But you cannot hide the cursor by setting the defaultCursor to none (I never actually tested it.):

Code: Select all

on mouseUp
   set the defaultCursor to none
end mouseUp
"None" leaves the arrow cursor.

So how does one hide one's cursor? There are only two styles (hand or arrow) where one can actually hide the cursor, and it is a two-step process:

Code: Select all

on mouseUp
   set the defaultCursor to hand  --or arrow
   set the  cursor to none
end mouseUp
None of the other styles work with the above handler; the chosen style sticks, but is not hidden. So if one wants to hide the cursor, one must use the handler above. Seems excessive. Anyone else have a method to hide the cursor?

I have not tried an image.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by FourthWorld » Tue Jul 09, 2024 2:04 am

See the lockCursor global property.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Hide cursor, yes, no, depends... HELP!

Post by richmond62 » Tue Jul 09, 2024 8:36 am

a "Help mode"
Well, then, that is certainly a fossilisation . . .

Possibly one could bung a '?' icon into the IDE so that on setting the cursor to help there would be a vaguely meaningful icon which could then be put to use . . .
-
Screenshot 2024-07-09 at 11.01.15.jpg
-
Attachments
Cursor Q.livecode.zip
Stack.
(131.43 KiB) Downloaded 137 times

Post Reply