Contextual menu trouble

William de Smet williamdesmet at gmail.com
Tue Jan 18 07:16:09 EST 2011


> 
> 

> Hi there,
> 
> I am working on a contextual menu in a textfield. 
> I searched this list, the forum on Runrev and used the Dictionary. 
> Everything works: I get a right click in a field but nothing happens
> after I choose the contextual menu. 
> Am I missing something?
> 
> 
> In a field:
> on mouseDown theMouseButton
>   if theMouseButton is 3 then
>      popup button "popup"
>  else 
>    pass mouseDown
>  end if
> end mouseDown
> 
> on mouseUp theMouseButton
>   if theMouseButton is 3 then
>     popup button "popup"
>  else 
>    pass mouseUp
>  end if
> end mouseUp
> 
> Button "popup":
> on menuPick pItemName
>   switch pItemName
>  case "Cut"
>    cut 
>    break
> case "Copy"
>    copy 
>    break
>  case "Paste"
>    paste 
>    break
>  end switch
> end menuPick
> 
> Greetings,  
> 
> William



More information about the use-livecode mailing list