set the cursor to none not working in LC 7.0.3
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
set the cursor to none not working in LC 7.0.3
I use LiveCode to control behavioral experiments.
I need the cursor to be invisible to the user for a few minutes, and I also need to make sure that any accidental user clicks have no effect during that period. In older versions of LiveCode I used “set the cursor to none” for that purpose, and it worked perfectly. This does not seem to work in LiveCode 7.0.3 (I just tried a beta version of LiveCode 8 with the same effect). Am I missing something? Is there an easy solution to that problem?
Axel
I need the cursor to be invisible to the user for a few minutes, and I also need to make sure that any accidental user clicks have no effect during that period. In older versions of LiveCode I used “set the cursor to none” for that purpose, and it worked perfectly. This does not seem to work in LiveCode 7.0.3 (I just tried a beta version of LiveCode 8 with the same effect). Am I missing something? Is there an easy solution to that problem?
Axel
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: set the cursor to none not working in LC 7.0.3
Hi Axel,
I see in LC 6.7.4 rc-1 the same.
The workaround is to use a fully transparent png as cursor
I attach a little stack that shows this.
Additionally I found that setting the cursor to an very high id that does not exists crashes LC 6.7.4 rc-1 (was trying to be smart and set the cursor to an non-existing id)
I will report both bugs.
Kind regards
Bernd
I see in LC 6.7.4 rc-1 the same.
The workaround is to use a fully transparent png as cursor
I attach a little stack that shows this.
Additionally I found that setting the cursor to an very high id that does not exists crashes LC 6.7.4 rc-1 (was trying to be smart and set the cursor to an non-existing id)
I will report both bugs.
Kind regards
Bernd
- Attachments
-
- CursorNone.livecode.zip
- (1.61 KiB) Downloaded 315 times
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: set the cursor to none not working in LC 7.0.3
I reported two bugs
Bug 14966 - set cursor to none not working
Bug 14965 - setting cursor to id of non-existing image crashes LC 7.0.4 rc1
Kind regards
Bernd
Bug 14966 - set cursor to none not working
Bug 14965 - setting cursor to id of non-existing image crashes LC 7.0.4 rc1
Kind regards
Bernd
Re: set the cursor to none not working in LC 7.0.3
Hi,
This seems to work fine in LC 8-dp-1 on Windows. Did it get fixed or is it a platform-specific issue?
Kind regards,
Mark
This seems to work fine in LC 8-dp-1 on Windows. Did it get fixed or is it a platform-specific issue?
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: set the cursor to none not working in LC 7.0.3
Hi Mark,
I tested now that you mention it in LC8 dp1 on MacOSX 10.9.5
It is the same as described above: Cursor to none does not work, crash when setting cursor to id of an non-existing image
Kind regards
Bernd
I tested now that you mention it in LC8 dp1 on MacOSX 10.9.5
It is the same as described above: Cursor to none does not work, crash when setting cursor to id of an non-existing image
Kind regards
Bernd
Re: set the cursor to none not working in LC 7.0.3
Hi Bernd,
Thank you very much for reporting the errors and for the helpful cursor script. I will try to adapt your script to my stack.
However, there is one remaining problem with the script: Although the cursor is invisible, it is still “there” and has a hotspot. Thus, when someone uses the mouse and clicks on an object, then that click causes an event and thus possibly an unwanted action. In my case, if this would happen, it could ruin the experiment and I would loose data.
This was not the case with “set the cursor to none”. I thus hope very strongly that the bug gets fixed very soon.
Kind regards,
Axel
Thank you very much for reporting the errors and for the helpful cursor script. I will try to adapt your script to my stack.
However, there is one remaining problem with the script: Although the cursor is invisible, it is still “there” and has a hotspot. Thus, when someone uses the mouse and clicks on an object, then that click causes an event and thus possibly an unwanted action. In my case, if this would happen, it could ruin the experiment and I would loose data.
This was not the case with “set the cursor to none”. I thus hope very strongly that the bug gets fixed very soon.
Kind regards,
Axel
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: set the cursor to none not working in LC 7.0.3
Hi Axel,
until the bug gets fixed you could add to your controls, a button for example:
it is ugly but better than a ruined experiment
Kind regards
Bernd
until the bug gets fixed you could add to your controls, a button for example:
Code: Select all
if the lockCursor then exit mouseUp
Kind regards
Bernd
Re: set the cursor to none not working in LC 7.0.3
Hi Bernd,
Thanks, this is a clever workaround!
I have one more question: where would I have to put this command to filter clicks in the backdrop area? (I have to use monitors of varying sizes, so I have a card centered on the screen surrounded by a gray backdrop to cover the rest of the screen, however large it may be.) I have tried card and stack scripts, but events generated by clicking into the backdrop area do not seem to surface there.
Thank you for all your help!
Axel
Thanks, this is a clever workaround!
I have one more question: where would I have to put this command to filter clicks in the backdrop area? (I have to use monitors of varying sizes, so I have a card centered on the screen surrounded by a gray backdrop to cover the rest of the screen, however large it may be.) I have tried card and stack scripts, but events generated by clicking into the backdrop area do not seem to surface there.
Thank you for all your help!
Axel
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: set the cursor to none not working in LC 7.0.3
Hi Axel,
in the IDE clicking in backdrop seems to make a distracting short flash of the stack.
if you want to prevent the user reaching the background with the mouse at all then here is a stack that interceptst the mouseScreenLoc.
The handler is in the card script and is started by either button "hide cursor for 3 seconds" or "backDropOn"
This prevents most of the time the cursor getting out of the rect of the stack.
Have a look if this is what you want.
Kind regards
Bernd
If you want to respond to clicks in the background look at mouseDownInBackground and mouseUpInBackground.I have tried card and stack scripts, but events generated by clicking into the backdrop area do not seem to surface there.
in the IDE clicking in backdrop seems to make a distracting short flash of the stack.
if you want to prevent the user reaching the background with the mouse at all then here is a stack that interceptst the mouseScreenLoc.
The handler is in the card script and is started by either button "hide cursor for 3 seconds" or "backDropOn"
This prevents most of the time the cursor getting out of the rect of the stack.
Have a look if this is what you want.
Kind regards
Bernd
- Attachments
-
- CursorNone2.livecode.zip
- (2.04 KiB) Downloaded 315 times
Re: set the cursor to none not working in LC 7.0.3
Thank you again! I needed to do extensive adaptation to get this running in my stack, but now it seems to work in most cases, and I just hope that the few cases in which it cannot work because my stack does special things will not cause (too many) fatal errors. Great!
Re: set the cursor to none not working in LC 7.0.3
Hi all, I tried to run Bernds scrip in LC 8.1.1. and I can not get even his workaround to work anymore. I have a stack that is drawing some gps data and I don't want the cursor to be seen while it is drawing. Using lock cursor / set cursor to none works within a single handler, but since I use a "send handler in x milliseconds" structure the cursor immediately shows up when it is moved between the execution of the handler. Does anyone have solved the "setting the cursor to none" issue in LC 8.1.1? I work on MacOs 10.10.5.
Thanks. Oliver
Thanks. Oliver
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: set the cursor to none not working in LC 7.0.3
Hi.
Setting the cursor to none surely (or will soon) hide it, but does not eliminate the hotSpot. It may be that we need a "disableCursor" property, or better, another parameter to the cursor property itself, set the cursor to "reallyNonExistant".
So your users could still accidentally click on something they should not.
Craig Newman
Setting the cursor to none surely (or will soon) hide it, but does not eliminate the hotSpot. It may be that we need a "disableCursor" property, or better, another parameter to the cursor property itself, set the cursor to "reallyNonExistant".
So your users could still accidentally click on something they should not.
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: set the cursor to none not working in LC 7.0.3
Hi Oliver,
I tried the stack in LC 9 DP6 and it works, however it does not work in version LC 8.1.1 to 8.1.3 as you discovered.
Kind regards
Bernd
I tried the stack in LC 9 DP6 and it works, however it does not work in version LC 8.1.1 to 8.1.3 as you discovered.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: set the cursor to none not working in LC 7.0.3
Hi Oliver,
as a matter of fact as far as I have seen in "cursory" testing all features of the cursor hiding and showing/locking seem to be working in DP6, the testStack started to work in DP5, I can not find the pull request for this but anyhow.
Kind regards
Bernd
as a matter of fact as far as I have seen in "cursory" testing all features of the cursor hiding and showing/locking seem to be working in DP6, the testStack started to work in DP5, I can not find the pull request for this but anyhow.
Kind regards
Bernd
Re: set the cursor to none not working in LC 7.0.3
Hi Bernd,
thanks for hint. I will test it myself with LC 9 DP6 to see if I get it to work. According to dunbarx setting cursor to none will NOT prevent the user from clicking randomly on the stack; it was my impression that this was precisely the idea of setting the cursor to none? Did I misunderstood? In the dictionary it only says setting cursor to none will hide it. It doesn't say if hiding also prevents clicking on objects. Thanks for any insights.
thanks for hint. I will test it myself with LC 9 DP6 to see if I get it to work. According to dunbarx setting cursor to none will NOT prevent the user from clicking randomly on the stack; it was my impression that this was precisely the idea of setting the cursor to none? Did I misunderstood? In the dictionary it only says setting cursor to none will hide it. It doesn't say if hiding also prevents clicking on objects. Thanks for any insights.