Bonjour Peter,

Below is the handlers that I am using in my stacks (thanks to Éric Chatonet)

I just added the case 2 (corresponding to your need)
Here (MacBook Pro 10.0.8 ; Rev 5.0.2) case 2 seems to work, as you are 
expecting.

Best regards from Grenoble

André

--------From Éric Chatonet
on mouseMove
    switch
        case "button" is in the target
            ShowHandCursor #
            break
            ---====
        case "field" is in the target and the lockText of the target is true\
                and the listBehavior of the target is true
        ShowHandCursor
        break
    case "field" is in the target and the lockText of the target is false
        if the commandKey is down then
            ShowHandCursor
        end if
        break
    case the mouseText is "#" and the imageSource of the mouseText is not empty
        ShowHandCursor
        break
        ---====
    case the mouseText = empty --important!
        unlock cursor
        break
    case "link" is in the textStyle of the mouseChunk
        ShowHandCursor #
        break
    default
        ResetCursor #
end switch
end mouseMove
------------------------------
on mouseLeave
 ResetCursor #
end mouseLeave
------------------------------
on ShowHandCursor
 set the cursor to hand
 lock cursor
end ShowHandCursor
------------------------------
on ResetCursor
    unlock cursor
end ResetCursor
-----------------------------------------------------------------



Le 12 oct. 2012 à 16:17, Peter M. Brigham a écrit :

> That never works. Setting "the cursor" will only be very fleeting, as the 
> cursor will revert to the defaultcursor at the next idle message, and it 
> happens so fast you never even see a flicker You can set "the cursor" then 
> lock the cursor, then unlock it in a mouseleave handler, and that will work, 
> but I learned a long time ago that this leads to persistent locked cursors, 
> since LC seems at times not to send "mouseleave" messages, eg when a modal 
> dialog is invoked, and randomly otherwise too.
> 
> I can set the defaultcursor successfully in other circumstances, eg, in a 
> mousemove handler over a button, to change it to "hand" to indicate to the 
> user that what's called for is a click on the button. I want to do the same 
> thing over an unlocked field when the commandkey is down, to indicate to the 
> user that a click is called for. I used to be able to do this, but now it 
> doesn't work any more.   ????
> 
> -- Peter
> 
> Peter M. Brigham
> pmb...@gmail.com
> http://home.comcast.net/~pmbrig
> 
> On Oct 12, 2012, at 9:36 AM, dunb...@aol.com wrote:
> 
>> Hi.
>> 
>> 
>> Try this with "the cursor" instead of "the defaultCursor".
>> 
>> 
>> Craig Newman
>> 
>> 
>> 
>> -----Original Message-----
>> From: Peter M. Brigham <pmb...@gmail.com>
>> To: How to use LiveCode <use-livecode@lists.runrev.com>
>> Sent: Fri, Oct 12, 2012 9:07 am
>> Subject: defaultcursor problem
>> 
>> 
>> Anyone have an idea why this doesn't work? Put the following into the script 
>> of 
>> an unlocked field:
>> 
>> on mousemove
>>  put the commandkey is down into cmK
>>  if cmK then
>>     set the defaultcursor to hand
>>  else
>>     set the defaultcursor to empty
>>  end if
>> end mousemove
>> 
>> I want the cursor to become "hand" with the commandkey down, but it simply 
>> remains a bar over an unlocked field. I swear this used to work, but for 
>> some 
>> reason it no longer does. 2008 MacBook, OSX 10.7.4 (Lion), Rev Studio 4.5.3, 
>> build 1210
>> 
>> -- Peter
>> 
>> Peter M. Brigham
>> pmb...@gmail.com
>> http://home.comcast.net/~pmbrig
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to