Page 1 of 1

button Menu oddity?

Posted: Tue Jan 31, 2017 5:36 pm
by dunbarx
I make a new card with, say, an option menu and a pulldown, whatever. I clear the scripts of both buttons and apply.

Now if I examine the script of either of them again, I find that the standard boilerPlate "menuPick" handler has been reinstated. I cannot clear those scripts and make them stick.

LC v.6.7, but I bet it matters not if I try v.8

Here is the odder part. The "menuPick" message is passed out of those buttons, because I can trap them in the card script. That is what I originally wanted anyway, with a bunch of pullDowns and a single card level handler.

So, are these "ghost" menuPick handlers, a la the "mouse up" handler in a newly created ordinary button? But that handler can be explicitly cleared (or applied, making it "real"), and stays clear, or applied.

If I add some gadgetry to the menuPick handler, I have to then pass "menuPick" explicitly, what I would consider "normal" behavior.

Ultimately, since an unadorned "menuPick" message is passed to the card, it does not bother me overmuch. I assume it is a "ghost", which is fine, I just never knew about it.

Craig Newman

Re: button Menu oddity?

Posted: Wed Feb 01, 2017 6:05 pm
by jacque
They're default handlers inserted whenever a control that has no script is edited. "Ghost" is probably a good name for them. If you get tired of seeing them, make any edit to the script, like replacing the ghost with a single space for instance, anything to make the script non-empty.

Re: button Menu oddity?

Posted: Thu Feb 02, 2017 1:14 am
by dunbarx
Jacque.

Right.

The ghost for a standard button, when its script is cleared, stays clear. I was just surprised that menu-style buttons are so stubborn. Recalcitrant. Are there others lurking about?

Craig

Re: button Menu oddity?

Posted: Thu Feb 02, 2017 6:32 am
by jacque
Some widgets seem to have stubborn default scripts.