control-clicking objects

Ken Ray kray at sonsothunder.com
Thu Apr 24 12:52:45 EDT 2008


> I am working on a set of stacks where I have developed over the years
> various commands for control-clicking objects (Mac). They now don't
> work in 2.9. What happens instead is: the object is selected and I
> get the "Edit Script/Property Inspector/Cut"... etc. popup. Is there
> any way to avoid that happening? I need to stay within the
> Development environment because I am always tweaking the stacks.

Fred, do you have the browse tool or the pointer tool when you're doing
this? The reason I ask is that I just ran a simple test with the browse tool
and don't get that, and if I use the pointer tool, my code is not executing
in either environment (2.8.1 or 2.9).

This is what I did:

1) Create a standard button and a popup button
2) Name the popup button "MyMenu"
3) Set the script of the standard button to:

on mouseDown pKey
  if pKey = 3 or the controlKey is down then
    popup button "myMenu" at the mouseLoc
  else
    pass mouseDown
  end if
end mouseDown

If I'm in browse tool, I get the "Choice 1", "Choice 2", and "Choice 3" menu
items. If I'm in pointer tool, I get "Edit Script..." etc., in both Rev
2.8.1 and Rev 2.9.


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list