Updating menus (was Re: Clipboard madness)
Jeanne A. E. DeVoto
revolution at jaedworks.com
Thu Sep 22 18:33:21 EDT 2005
At 1:22 PM -0700 9/22/2005, Richard Gaskin wrote:
>But if the user has text on the Clipboard from another app, how does
>your app know without something horribly inefficient like polling?
I'd be inclined to just check the clipboard function on mouseDown in
the menu bar. That way you only need to update the menu when it's
actually displayed. (Of course you'd also need to check the clipboard
in the menuPick handler itself, because if the user uses a keyboard
equivalent you won't get the mouseDown, but I think that's not a bad
idea anyway, just on general principles - it's the last line of
defense for error handling in case the clipboard content isn't what
you thought it was.)
--
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com
More information about the use-livecode
mailing list