More drawing tool woes: no mouseDown or mouseUp sent?

Buster wouter.abraham at scarlet.be
Sat Sep 10 05:53:43 EDT 2005


Hi,

To illustrate the essence of what I use sometimes in similar cases,  
try this:

1 button named "start" (or whatever but then adapt the example script)
with the handler:

on mouseUp
   checkmouse
   set the label of me to "checkmouse on"
end mouseUp

and the following handler in the card or stack script:

on checkmouse
   get the mouse is down
   put item itemoffset(it,"false,true") of "up,down" into tMS
   put the mousecontrol into tMC
   put the selectedobject into tSO
   put "mousecontrol:"&&tMC &cr&"selectedObject(s):"&& tSO & cr  
&"mouse" && tMS
   if the optionkey is  down then set the label of btn "start" to  
"checkmouse off"
   else send "checkmouse" to me in 50 millisecs ### adapt to taste
end checkmouse


If not applicable then consider this mail as non-existent

Greetings,
WA

On 10 Sep 2005, at 10:12, Richard Gaskin wrote:

> MisterX wrote:
>
>> Richard,
>> Can't you set up either A frontscript that traps mousedown and up  
>> before your controls...
>> this front scripts remembers where that happened and passes it or
>> treats the value...
>>
>
> That one won't work, because there is not message to trap at any  
> level if the pointer tool is active. :(
>
>
>> An alternative is to have a card framework that does all the  
>> events instead
>> of having the controls in the card relay the events. It would give  
>> you more
>> control i believe - not the best way to program rev though, it's  
>> still
>> "legal!"
>>
>
> Polling?  I've been doing waaaay to much polling to work around  
> other messaging anomalies; kinda hate to add more overhead like  
> that if I could avoid it.  But indeed, perhaps I can't.....
>
>
> --
>  Richard Gaskin
>  Fourth World Media Corporation
>  __________________________________________________
>  Rev tools and more: http://www.fourthworld.com/revld.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list