messages to buttons when the mouse is already down

David Vaughan drvaughan55 at mac.com
Mon Jan 21 18:33:01 EST 2002


Terry's suggested use of the idle handler will probably draw another 
response about 'avoid idle" but there are times like these when it is 
useful. What is needed is a better way to handle it. Under HyperCard I 
wrote a set of XCMDs/XFCNs to manage a "task space" efficiently and make 
it easy to add and remove tasks without the fiddles and inefficiency 
which grow when you try to script "on idle". I am busy at work at the 
moment but should be able to post some scripts this evening for doing it 
directly in Rev. Incidentally, "send message in <N ms>" is very useful 
but there are times when you just want to act in time complementary to 
the user's activity, rather than forcing the action at a given time, and 
idle can be useful for this if used sparingly. So, Michael, Terry's 
suggestion is good and if you'll give me a few hours I hope to give you 
a better way of doing it.

cheers
David

On Tuesday, January 22, 2002, at 10:03 , Terry Judd wrote:

>> I would like to track the movement of the mouse through an array of 
>> buttons by hilighting each button that the mouse (button already down) 
>> passes over. However, the mouseEnter, mouseMove, mouseWithin messages 
>> are only sent to the first button because that button receives the 
>> mouseDown event and is the target. Similarly the mouseControl function 
>> (yes, it took me a couple of tries to notice that it was a function 
>> and not a message!) only returns the target.
>>
>> How can I get the other buttons to hilight without requiring the user 
>> to click each individually?
>
> How about using an idle handler and checking whether the cursor is 
> within the rect of the individual buttons - or better still convert the 
> mouseloc to an integer reflecting a button position in the array - and 
> then set the hilite of the target button (and turn off the hilite of 
> any previous target).
>
> Terry...
>
>> --
>> Michael J. Lew
>>
>> Senior Lecturer
>> Department of Pharmacology
>> The University of Melbourne
>> Parkville 3010
>> Victoria
>> Australia
>>
>> Phone +613 8344 8304
>>
>> **
>> New email address: michaell at unimelb.edu.au
>> **
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> -- 
> ___________________________________________________________________________
> Dr Terry Judd
>
> Lecturer in Instructional Design / Multimedia Developer
> Biomedical Multimedia Unit
> Faculty of Medicine, Dentistry & Health Sciences
> The University of Melbourne
> Email: t.judd at bmu.unimelb.edu.au
> Phone: 03 9344 0187
> Fax: 03 9344 4998
> ___________________________________________________________________________
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list