why does my popup menu works only in a function call?

Ken Ray kray at sonsothunder.com
Wed May 9 12:05:34 EDT 2007


> I would like to understand, what the difference is and what my fault is why
> the second approach doesn't work.

Well, I don't know why the app freezes, but if you are calling a 
handler from within another handler, you don't need to use "send" if 
it's in the message passing hierarchy (since "send" is intended for 
sending a message *to* a specific object, and you didn't provide one). 

So for example, if your "mausMenue" handler was in the same object as 
the mouseDown, or in the card script of the card that had the 
"mouseDown" trap, or was in its stack script or in any libary you had 
put into use, you could simply use this mouseDown handler:

on mouseDown
  mausMenue
  -- (other code here, if any)
end mouseDown

and have the called handler be:

on mausMenue
  popup stack "mausMenue"
end mausMenue

HTH,

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