popUp a button with itself on modified mouseDown?
paulhibbert at mac.com
Mon Jun 30 20:49:46 CEST 2014
If your script is in a PopUp Menu button then it's probably just getting confused trying to pop up itself!
Maybe try something like this in a PopUp Menu ensuring that the "menuMouseButton" prop is set to "1"…
if the shiftKey is down then
put "Shift Key and" into sModKey
put "Just" into sModKey
on mouseUp pBtn
if pBtn = 3 then answer sModKey && the short name of me
on menuPick pItemName
answer sModKey && pItemName
On 2014-06-30, at 8:48 AM, Dr. Hawkins <dochawk at gmail.com> wrote:
> I'm trying to get a button to normally be a boring old popup, but allow
> other things to be chosen by it.
> The "natural" way would seem to to change it on mousenter if the specified
> modifier key is down, or if the second button is clicked.
> I get the change to happen trivially, but if I'm doing it from a mouseDown,
> I can't get it to display itself. I'm trying things like,
> on mouseDown bt
> if bt=3 then
> popup button the short name of the target
> end if
> pass mouseDown
> end mouseDown
> But I'm not finding a magic combnation
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode